Sorry to ask a question that appears like the one posed by a n00b.
(Maybe I am going blind, seriously).
I have searched the forum for it, but couldn't find it.
How can I tell which version of rails I am running? Doing "rails -v"
fails. That's another question -- why does it fail -- why can't it tell
me the version string?
In what way does it fail ?
That aside, rails -v tells you what the latest version of rails on your computer is, which isn't the same thing as what version your rails apps are running.
That can be controlled by
- having RAILS_GEM_VERSION set to something in environment.rb
- having rails frozen into vendor/rails
when you run script/console or script/server it should tell you what version of rails its loading.
Yes, Ubuntu puts their own Rails binscript (written in *bash*. ugh!)
in there because apparently they hate you and the whole of the Rails
community for some reason.
Try something like "rails --version". And file a bug with Ubuntu
because they're the ones who maintain their stupid script.
I think Ubuntu screws this up further because apparently their rails
script does not identify -d mysql to mean database to use. Instead, it
treats it as a folder, apparently, for example, if I did:
$> rails -d mysql people => this rails is from apt-get
install rails
I get two folders created: "mysql" and "people".
Instead, if I installed RubyGems and did gem update --system and then
used the rails from there, it works better. Unfortunately, this rails
script is located in /var/lib/gems/1.8/bin and the Ubuntu (faulty)
script is in /usr/bin. So, I need to use /var/lib/gems/1.8/bin/ before
/usr/bin in my PATH!