A bit of Git, a bit of Ruby and you will get your local hibernate.org served.
-
Get Git
-
Get GNU Wget 1.14
-
If on Mac OS:
-
Get XCode (needed for native gems)
-
-
If on Linux:
-
Get libxslt-dev - eg via
sudo apt-get install libxslt-dev
-
may be called libxslt1-dev for some distros
-
Note
|
For Linux Mint users - installing rvm (below) may not work. Be sure to instead install latest ruby-dev package via apt-get… |
Install Git to your system. GitHub’s help page is a good starting point.
If you are looking for some tips and tricks, checkout Emmanuel’s blog.
Ruby like many other platforms has its dependency hell. We do recommend you use RVM to isolate your ruby runtimes as well as dependencies (gems). The RVM steps are optional though. If you are not going to use RVM have a look at the different Ruby installations options you have.
-
Install RVM
curl -L https://get.rvm.io | bash
-
Set up the isolated environment for the site
rvm install 1.9.3
rvm use 1.9.3
rvm gemset create awestruct
Note
|
For some distros using the bash shell, you’ll need to enable "login shell". "rvm use" will complain, otherwise. See https://rvm.io/integration/gnome-terminal for more info. |
-
RVM config (optional)
Add a
.rvmrc
file in the directory containingrvm ruby-1.9.3@awestruct
This will set up the right environment when you enter the directory. The first time, leave and re-enter the directory
cd ..;cd hibernate.org
Next, let’s retrieve the website.
git clone [email protected]:hibernate/hibernate.org.git
cd hibernate.org
-
Run
rake preview
-
Open your browser to http://localhost:4242
Any change will be automatically picked up except for changes to _partials
files.
Note
|
You might see warnings at startup like
That’s ok, it’s not your fault ;) It’s related to some Awestruct limitations. |
Using you local site, you can have a look at our survival guide to editing this website to get you started.
On Linux, serving the file may be atrociously slow (something to do with WEBRick).
Use the following alternative:
-
Go in your
~/hibernate.org
directory. -
Run
awestruct --auto -P development
-
In parallel, go to the
~/hibernate.org/_site
directory -
Run
python -m SimpleHTTPServer 4242
You should be back to millisecond serving :)
The content of this repository is released under the ASL 2.0.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the respective licenses mentioned above.
This website uses JBoss Community Bootstrap.