Installation and versioning issues

Ok, I'm new to Rails, and I was hoping to get some advice on how to
get started.

I'm coming from a .NET background, and from what I've seen of Rails,
it looks perfect for a little web idea I had. So I got a book from the
library and sat down to install it on my Ubuntu box. Immediately I hit
versioning issues.

- I installed ruby with apt-get and it gave me 1.8.7. I'm cool with
this as I'm new to Ruby as well, and am ignorant to the differences
between versions.

- Installed rubygems and I got 1.3.5. Again, I don't know the
difference

- I ran 'sudo gem install rails', and it blew up on me, saying that I
needed rubygems 1.3.6 or higher. When I do a gem list, it shows
rails(3.0.0), which I hear just came out a week or two ago. Again, I
don't know the difference so that's why I'm here. The book I got from
the library is older(2007) and using Rails 1.2.3.

So my question is: what's the easiest way to get this setup? Is there
a major difference between the versions of Rails, and if so, what is
it? I just need a plain vanilla setup so I can learn about MVC and
such. This web app is pretty basic, I was just wanting some basic
ActiveRecord, a few Erb templates and a few dozen lines of ruby
business logic.

Can someone point me in the right direction?

library and sat down to install it on my Ubuntu box. Immediately I hit
versioning issues.

- I installed ruby with apt-get and it gave me 1.8.7. I'm cool with
this as I'm new to Ruby as well, and am ignorant to the differences
between versions.

1.8.7 is fine.

- Installed rubygems and I got 1.3.5. Again, I don't know the
difference

Ubuntu (and Debian) have some issues with rubygems... try installing it directly...

http://rubygems.org/

- I ran 'sudo gem install rails', and it blew up on me, saying that I
needed rubygems 1.3.6 or higher. When I do a gem list, it shows
rails(3.0.0), which I hear just came out a week or two ago. Again, I
don't know the difference so that's why I'm here. The book I got from
the library is older(2007) and using Rails 1.2.3.

Take the book back to the library. Things have changed enough that that book is just going to mess you up.

So my question is: what's the easiest way to get this setup?

http://guides.rubyonrails.org/

Is there a major difference between the versions of Rails, and if so, what is
it?

Yes. Anything prior to 2.3.9 is old. Your choice right now is whether to go with 2.3.9 or 3.0.0. If you're just starting out on a small project, I'd probably go with 3.0.0 as that's where the future is going and enough has changed that you might as well start there.

The only drawback is I don't think any books are out yet for 3.0, but there should be plenty of online articles...

Can someone point me in the right direction?

I'd start with these two sites...

http://guides.rubyonrails.org/
http://railscasts.com/ (look for 3.0 specific stuff)

-philip

Nick Dr wrote:

Ok, I'm new to Rails, and I was hoping to get some advice on how to
get started.

I'm coming from a .NET background, and from what I've seen of Rails,
it looks perfect for a little web idea I had. So I got a book from the
library and sat down to install it on my Ubuntu box. Immediately I hit
versioning issues.

- I installed ruby with apt-get and it gave me 1.8.7. I'm cool with
this as I'm new to Ruby as well, and am ignorant to the differences
between versions.

- Installed rubygems and I got 1.3.5. Again, I don't know the
difference

I highly recommend RVM (Ruby EnVironment Manager). RVM is really simple
to install and it makes installing Ruby and RubyGems drop-dead simple.
You get to have as many different rubies and gemsets as you want.

http://rvm.beginrescueend.com/

- I ran 'sudo gem install rails', and it blew up on me, saying that I
needed rubygems 1.3.6 or higher. When I do a gem list, it shows
rails(3.0.0), which I hear just came out a week or two ago. Again, I
don't know the difference so that's why I'm here. The book I got from
the library is older(2007) and using Rails 1.2.3.

Again RVM solves this problem beautifully.

So my question is: what's the easiest way to get this setup? Is there
a major difference between the versions of Rails, and if so, what is
it? I just need a plain vanilla setup so I can learn about MVC and
such. This web app is pretty basic, I was just wanting some basic
ActiveRecord, a few Erb templates and a few dozen lines of ruby
business logic.

1. Install RVM
http://rvm.beginrescueend.com/rvm/install/

2. rvm install ruby-1.9.2
3. gem install rails
4. rails new my_project
5. Add what you need to Gemfile in your Rails project (like
sqlite3-ruby, etc.)
6. bundle install
7. Read up on all the other cool stuff RVM gives you.

go with RVM is clean and easy

Hi

You can check out my blog post on this

http://saurabhbhatia.tumblr.com/post/604423794/install-ruby-on-rails-on-ubuntu-10-04-lucid-lynx

For Installing a specific version of Rails do the following :

sudo gem install -v=2.3.8 rails

You can start learning it using http://guides.rubyonrails.org/index.html
which covers Rails 2.3.8

Rails 3.0 is the current version of Rails. For getting started on it
following are some links :

http://www.rubyinside.com/rails-3-0-beta-links-2966.html

http://railsnotes.com/rails-3/

Regards