NEWBIE issue: getting the rails command to work

My OS: Swift Linux (derivative of antiX Linux, a lightweight version of MEPIS)

The package I installed is rails-ruby1.8.

I'm using the book _Head First Rails_ to get started with Ruby on Rails. I'm trying to get started on the very first exercise, but entering "rails tickets" gives me a "command not found" error, which tells me that Rails isn't actually installed.

I downloaded the Rails code from the book's official web site. Exactly WHAT do I need to do before I can get started with the chapter 1 exercise? After installing rails-ruby1.8, I entered the command "gem install rails" as root. Everything went OK except for a message saying "file 'lib' not found". The book says I'm to enter the command "rails tickets" to run the program, but it says NOTHING about what directory I need to cd my way into first.

Can anyone here shed some light on this? _Head First Rails_ seems to be a great book EXCEPT that it doesn't tell me how to get started. How can they expect me to go through all their exercises when they don't even provide the prequisites for getting them to work?

···

--
Jason Hsu
Founder and lead developer of Swift Linux (http://www.swiftlinux.org)

The "rails tickets" command didn't work, but the "rails new tickets" command did work.

Now I'm supposed to cd my way into the tickets folder and enter "ruby script/server". I have no difficulty getting into the tickets folder, but when I enter "ruby script/server", I get the error message: "ruby: No such file or directory -- script/server (LoadError)"

What do I need to get the ruby command to work?

···

--
Jason Hsu
Founder and lead developer of Swift Linux (http://www.swiftlinux.org)

Jason Hsu wrote in post #1018852:

My OS: Swift Linux (derivative of antiX Linux, a lightweight version of
MEPIS)

The package I installed is rails-ruby1.8.

I'm using the book _Head First Rails_ to get started with Ruby on Rails.

rails gets updated so often that rails books become out of date very
quickly. Are you sure you want to use a 3 year old book to learn rails?

···

--
Posted via http://www.ruby-forum.com/\.

Sounds like your book is written for Rails 2, but you have Rails 3
installed.

You can uninstall with `gem uninstall rails` then `gem install rails
--version 2.3` (or whatever version your book says its using).

···

On Sat, Aug 27, 2011 at 11:06 PM, Jason Hsu <jhsu802701@jasonhsu.com> wrote:

The "rails tickets" command didn't work, but the "rails new tickets"
command did work.

Now I'm supposed to cd my way into the tickets folder and enter "ruby
script/server". I have no difficulty getting into the tickets folder, but
when I enter "ruby script/server", I get the error message: "ruby: No such
file or directory -- script/server (LoadError)"

What do I need to get the ruby command to work?

Here's a list of available versions All versions of rails | RubyGems.org | your community gem host

···

On Sat, Aug 27, 2011 at 11:18 PM, Josh Cheek <josh.cheek@gmail.com> wrote:

On Sat, Aug 27, 2011 at 11:06 PM, Jason Hsu <jhsu802701@jasonhsu.com>wrote:

The "rails tickets" command didn't work, but the "rails new tickets"
command did work.

Now I'm supposed to cd my way into the tickets folder and enter "ruby
script/server". I have no difficulty getting into the tickets folder, but
when I enter "ruby script/server", I get the error message: "ruby: No such
file or directory -- script/server (LoadError)"

What do I need to get the ruby command to work?

Sounds like your book is written for Rails 2, but you have Rails 3
installed.

You can uninstall with `gem uninstall rails` then `gem install rails
--version 2.3` (or whatever version your book says its using).