Error trying to execute Rails in Fedora Core 6

Guys, I am starting with RoR and was developing on windows environment. Everything great.

Here at work we use FEdora, and, after installing, Ruby, RubyGems, dependencies and Rails, all I get from the terminal is:

[leonardo@localhost ~]$ rails /home/leonardo/apps/gems/rails-1.2.3/bin/rails: line 1: syntax error near unexpected token `(' /home/leonardo/apps/gems/rails-1.2.3/bin/rails: line 1: `require File.dirname(__FILE__) + '/../lib/ruby_version_check''

Any idea? I searched the web but didn't find anything to clarify this problem!

Thanks in advance!

Leo

this is the topline of rails file:

require File.dirname(__FILE__) + '/../lib/ruby_version_check'

is anything wrong with it?

Thanks

I'm running rails on FC6. don't know why your gems are installed in your home directory or why you're even running the rails file in that bin dir. rails should be in /usr/bin.

how did you install rubygems in the first place?

everything ruby related should be located in /usr/lib/ruby on FC6 by default.

these are the FC6 ruby packages you should have installed (latest versions)

ruby-rdoc-1.8.5.35-1.fc6 ruby-devel-1.8.5.35-1.fc6 ruby-libs-1.8.5.35-1.fc6 ruby-irb-1.8.5.35-1.fc6 ruby-ri-1.8.5.35-1.fc6 ruby-1.8.5.35-1.fc6