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.
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...
- 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?
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...
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.
- 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.
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.