I was reviewing the Agile Web Development with Rails (4th beta edition), it explains how to install RoR in Windows, Linux and MacOs flavors, i had some problems following the instructions for installing RoR on my Ubunut 10.10 Maverick box. Looks like it's been written for Ubuntu 10.04, there are some required libraries to get RoR installed on your box.
Installing basic elements
$ sudo apt-get install build-essential zlib1g-dev libssl-dev libreadline5-dev libfcgi-dev
Installing ruby and ruby gems
$sudo apt-get install ruby irb rubygems ruby1.8-dev
Installing sqlite3
$sudo apt-get install sqlite3 libsqlite3-dev
Finally install rails and sqlite3-ruby using gems
$sudo gem install rails
$sudo gem install sqlit3-ruby
In case we will not found the rails command add the gems to $PATH; to make this edit yor .bashrc file and add the following instruction
export PATH=/var/lib/gems/1.8/bin:$PATH
Now, we are gonna test that everything is working as expected.
Create a demo directory
$mkdir demo
Create a RoR project
$rails new myapp
$cd myapp
$rails server
We will gotta something like this at the console output.
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-02-02 14:52:26] INFO WEBrick 1.3.1
[2011-02-02 14:52:26] INFO ruby 1.8.7 (2010-06-23) [i686-linux]
[2011-02-02 14:52:31] INFO WEBrick::HTTPServer#start: pid=7609 port=3000
Now open your favorite browser and enter to http://localhost:3000/
Hope this guide will be helpful for you.
miércoles, 2 de febrero de 2011
Suscribirse a:
Entradas (Atom)
