What's the easiest way for novice to install RoR

hi,

i am fairly novice in RoR. Even i don’t have clear idea of RoR. but i
am highly interested to learn RoR. i have some experience in php
(mostly windows environment). so far i understand, RoR is best with
linux. well, i have fedora 10 installed. php,mysql and apache2 is also
installed. i am able to browse a page http://localhost/test_script.php

in addition, in windows i use WAMP(Windows Apache MySql and PHP) which
is really easy and install in one shot. now i am looking for
equivalent of WAMP in fedora 10. i guess there are no tool in linux
like WAMP. so, if i get an step by step instruction of “How to install
RoR in Fedora 10” it shall feel lucky. please don’t answer me to
googled. because i already do that and make confused myself. you guys
are expert. so please let me have the best link or guideline.

please note that, i am new in linux too. and i know where is the
terminal in fedora 10 and some basic knowledge of file structures.

thanks
Sumon

Hi Sumon,

I recommend that you start in Windows (because that is your most
familiar
environment) using RubyStack:

http://bitnami.org/stack/rubystack

RubyStack is like WAMP for Ruby. When you’re comfortable with it, switch
to
Linux because it will run much faster.

CmdJohnson

Hi

Try book recomended for me in this forum
http://www.ruby-forum.com/topic/185496#new

It is really, very very good book

Sumon [email protected] writes:

in addition, in windows i use WAMP(Windows Apache MySql and PHP) which
is really easy and install in one shot. now i am looking for
equivalent of WAMP in fedora 10. i guess there are no tool in linux
like WAMP.

Have you ever heard of LAMP?

so, if i get an step by step instruction of “How to install RoR in
Fedora 10”

If you are lucky (you have choosen the development package
collection), it may already be installed. open a console and try to
enter ‘rails’, it may already be there.

Depending on what version of Fedora you use, there is a graphical
package management application similar to “Add/Remove Programs” in
windows (e.g. http://www.aravind.name/packagekit-fedora-9) use that
tool to add ‘ruby’ and ‘rubygems’ then on a console run ‘gem install
rails’

Jarl

Jarl F. wrote:

Sumon [email protected] writes:

in addition, in windows i use WAMP(Windows Apache MySql and PHP) which
is really easy and install in one shot. now i am looking for
equivalent of WAMP in fedora 10. i guess there are no tool in linux
like WAMP.

Have you ever heard of LAMP?

so, if i get an step by step instruction of “How to install RoR in
Fedora 10”

If you are lucky (you have choosen the development package
collection), it may already be installed. open a console and try to
enter ‘rails’, it may already be there.

Depending on what version of Fedora you use, there is a graphical
package management application similar to “Add/Remove Programs” in
windows (e.g. http://www.aravind.name/packagekit-fedora-9) use that
tool to add ‘ruby’ and ‘rubygems’ then on a console run ‘gem install
rails’

The default database for the latest version of rails is sqlite3, so it
might be best to install that database first. Then doesn’t the op also
need to install a package that lets ruby talk to whatever database the
op chooses to use?

So I think the op needs to do 5 things:

  1. install ruby
  2. install sqlite3(preferred) or mysql
  3. install rubygems
  4. install the latest version of rails
  5. install a package that allows ruby to talk to the database of choice

And if that isn’t enough, you may need to install some additional
dependencies that those things require.

I have the latest edition of AWDWR which is the 3rd edition, and it’s
the book linked to previously. This is what it says about installing on
Linux:

  1. Use your platform’s native package management system to do the
    installing, e.g. rpm.

  2. Install necessary dependencies:

$ sudo rpm update
$ sudo rpm install build-essential libopenssl-ruby
$ sudo rpm install ruby rubygems ruby1.8-dev libsqlite3-dev

  1. Before proceeding check to make sure your installation of rubygems is
    1.3.1 or later.

$ gem -v

If not, try updating like this:

$ sudo gem update --system

or if that doesn’t succeed in updating, try:

$ sudo gem install rubygems-update
$ sudo update_rubygems

or if that doesn’t work, try:

$ sudo gem install rubygems-update
$ cd /var/lib/gems/1.8/gems/rubygems-update-*
$ sudo ruby setup.rb

otherwise, install a higher version from source:

$ wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
$ tar xzf rubygems-1.3.1.tgz
$ cd rubygems-1.3.1
$ sudo ruby setup.rb

$ sudo gem install rails

$ sudo gem install sqlite3-ruby

When prompted select the topmost gem that contains the word “ruby” in
parentheses.

  1. You may need to add /var/lib/gems/1.8/bin to your PATH environment
    variable. You can do that by adding this line to your .bashrc file:

export PATH=/var/lib/gems/1.8/bin:$PATH

Good luck.

download and install ubuntu from ubuntu.org

open Applications->Acccessories->Terminal and type

sudo apt-get install mysql
sudo apt-get install ruby
sudo apt-get install rubygems
sudo gem install rails
cd /var/www
sudo chown $USER .
rails mywebsite
cd mywebsite
script/server

click on the firefox icon in the top panel and enter
http://localhost:3000

install netbeans for linux from netbeans.org to develop your website

regards
damian

I forgot something

also type in the terminal window after installing the rails gem

sudo gem install mysql

7stud – wrote:
[…]

So I think the op needs to do 5 things:

  1. install ruby

…which might already be installed

  1. install sqlite3(preferred) or mysql

From what I can tell, sqlite is absolutely not “preferred”. Although
I’ve never worked with it, I’ve seen a number of posts on this list that
suggest that sqlite is not powerful enough for real development, let
alone deployment.

And mySQL has its own problems. Just skip the hassle and go straight to
PostgreSQL.

  1. install rubygems

…if it wasn’t already installed with Ruby.

  1. install the latest version of rails
  2. install a package that allows ruby to talk to the database of choice

Yes. These can be done in either order.

And if that isn’t enough, you may need to install some additional
dependencies that those things require.

Of course.

I have the latest edition of AWDWR which is the 3rd edition, and it’s
the book linked to previously. This is what it says about installing on
Linux:

  1. Use your platform’s native package management system to do the
    installing, e.g. rpm.

  2. Install necessary dependencies:

$ sudo rpm update
$ sudo rpm install build-essential libopenssl-ruby
$ sudo rpm install ruby rubygems ruby1.8-dev libsqlite3-dev

Don’t assume that the dependencies will be the same for every OS.

  1. Before proceeding check to make sure your installation of rubygems is
    1.3.1 or later.

$ gem -v

If not, try updating like this:

$ sudo gem update --system

or if that doesn’t succeed in updating, try:

$ sudo gem install rubygems-update
$ sudo update_rubygems

or if that doesn’t work, try:

$ sudo gem install rubygems-update
$ cd /var/lib/gems/1.8/gems/rubygems-update-*

That path is highly OS-dependent.

$ sudo ruby setup.rb

otherwise, install a higher version from source:

$ wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
$ tar xzf rubygems-1.3.1.tgz
$ cd rubygems-1.3.1
$ sudo ruby setup.rb

$ sudo gem install rails

$ sudo gem install sqlite3-ruby

When prompted select the topmost gem that contains the word “ruby” in
parentheses.

  1. You may need to add /var/lib/gems/1.8/bin to your PATH environment
    variable. You can do that by adding this line to your .bashrc file:

export PATH=/var/lib/gems/1.8/bin:$PATH

I am not sure why this would be necessary.

Good luck.

For the record, things on Mac OS are much easier:

  • On Leopard, install the developer tools from the CD. These include
    Ruby and Rails.
  • On earlier versions, use Locomotive.

I’ve heard good things about InstantRails on Windows, but never used it.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

7stud wrote:

I have the latest edition of AWDWR which is the 3rd edition, and it’s
the book linked to previously. This is what it says about installing on
Linux:

Marnen Laibow-Koser wrote:

7stud – wrote:
[…]

So I think the op needs to do 5 things:

  1. install ruby

…which might already be installed

  1. install sqlite3(preferred) or mysql

From what I can tell, sqlite is absolutely not “preferred”.

Well, the rails developers switched the default database in rails from
mysql to sqlite3, so someone prefers it.

Although
I’ve never worked with it, I’ve seen a number of posts on this list that
suggest that sqlite is not powerful enough for real development, let
alone deployment.

Dave T., Sam Ruby, and David Heinemeir Hansson(who created ruby on
rails) have written a highly acclaimed 700 page book on developing with
rails, AWDWR(3rd), and they use sqlite3 as the database for the whole
book, so I think beginners should be able to get by. Personally, I
would prefer to use mysql because that is what I’m familiar with, but I
don’t anticipate having any problems using sqlite3. In any case, it’s
easy enough to configure a rails app to use mysql or any other database.

Hi,

If you want to start in 1 minute with one click on Windows use
InstantRails.
You can also update rails to the latest release after using that
installer.

That contains all you need, included webserver and db. One click.

http://instantrails.rubyforge.org/wiki/wiki.pl?back=Instant+Rails

Cheers.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs