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? -Kedar -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 19 Jan 2009, at 00:24, Kedar Mhaswade wrote:> > 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. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 19 Jan 2009, at 00:24, Kedar Mhaswade wrote: > >> > 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. > > FredThank you. But I don''t think rails -v works. I think I have rails 2.0.2 or something like that (and that''s what I am trying to ascertain) but on my Ubuntu here is what happens: kedar@kedar-laptop:~/Projects/ror/people$ which rails /usr/bin/rails kedar@kedar-laptop:~/Projects/ror/people$ rails -v getopt: invalid option -- v Terminating... -Kedar -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi there Kedar, Try script/about or, alternatively you can do a gem list. If you have only one version of rails installed gem list will indicate this. HTH, Schalk Kedar Mhaswade wrote:> Frederick Cheung wrote: >> On 19 Jan 2009, at 00:24, Kedar Mhaswade wrote: >> >> 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. >> >> Fred > > Thank you. But I don''t think rails -v works. I think I have rails 2.0.2 > or something like that (and that''s what I am trying to ascertain) but on > my Ubuntu here is what happens: > kedar@kedar-laptop:~/Projects/ror/people$ which rails > /usr/bin/rails > kedar@kedar-laptop:~/Projects/ror/people$ rails -v > getopt: invalid option -- v > Terminating... > > -Kedar--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. --Jeremy On Sun, Jan 18, 2009 at 7:13 PM, Kedar Mhaswade <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Frederick Cheung wrote: >> On 19 Jan 2009, at 00:24, Kedar Mhaswade wrote: >> >>> >> 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. >> >> Fred > > Thank you. But I don''t think rails -v works. I think I have rails 2.0.2 > or something like that (and that''s what I am trying to ascertain) but on > my Ubuntu here is what happens: > kedar@kedar-laptop:~/Projects/ror/people$ which rails > /usr/bin/rails > kedar@kedar-laptop:~/Projects/ror/people$ rails -v > getopt: invalid option -- v > Terminating... > > -Kedar > -- > Posted via http://www.ruby-forum.com/. > > > >-- http://jeremymcanally.com/ http://entp.com/ http://omgbloglol.com My books: http://manning.com/mcanally/ http://humblelittlerubybook.com/ (FREE!) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
To go one step farther, I would recommend installing RubyGems from source and then installing Rails through RubyGems. Much better situation. On Jan 18, 7:24 pm, "Jeremy McAnally" <jeremymcana...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > --Jeremy > > On Sun, Jan 18, 2009 at 7:13 PM, Kedar Mhaswade > > > > <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > Frederick Cheung wrote: > >> On 19 Jan 2009, at 00:24, Kedar Mhaswade wrote: > > >> 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. > > >> Fred > > > Thank you. But I don''t think rails -v works. I think I have rails 2.0.2 > > or something like that (and that''s what I am trying to ascertain) but on > > my Ubuntu here is what happens: > > kedar@kedar-laptop:~/Projects/ror/people$ which rails > > /usr/bin/rails > > kedar@kedar-laptop:~/Projects/ror/people$ rails -v > > getopt: invalid option -- v > > Terminating... > > > -Kedar > > -- > > Posted viahttp://www.ruby-forum.com/. > > --http://jeremymcanally.com/http://entp.com/http://omgbloglol.com > > My books:http://manning.com/mcanally/http://humblelittlerubybook.com/(FREE!)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bobnation wrote:> To go one step farther, I would recommend installing RubyGems from > source and then installing Rails through RubyGems. Much better > situation. > > On Jan 18, 7:24�pm, "Jeremy McAnally" <jeremymcana...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>Maybe then http://wiki.rubyonrails.org/rails/pages/Installation should prefer RubyGems installation to "apt-get install ruby" (i.e. swap the order). -Kedar -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kedar Mhaswade wrote:> Bobnation wrote: >> To go one step farther, I would recommend installing RubyGems from >> source and then installing Rails through RubyGems. Much better >> situation. >> >> On Jan 18, 7:24�pm, "Jeremy McAnally" <jeremymcana...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > Maybe then http://wiki.rubyonrails.org/rails/pages/Installation should > prefer RubyGems installation to "apt-get install ruby" (i.e. swap the > order). > > -KedarI 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! I think the community should be aware of this. Thank you! -Kedar -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---