NEWBIE issue: getting the rails command to work

My OS: Swift L. (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?

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?

On Sat, Aug 27, 2011 at 11:06 PM, Jason H. [email protected]
wrote:

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

Jason H. wrote in post #1018852:

My OS: Swift L. (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.

  1. rails != ruby. There is a rails forum next door. Check the forum
    list.

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

On Sat, Aug 27, 2011 at 11:18 PM, Josh C. [email protected]
wrote:

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

Here’s a list of available versions
https://rubygems.org/gems/rails/versions