A few days ago I got a new Macbook Pro (yippie!). Until now, I was using Instant Rails on Windows. I am now trying to get my rails projects to run on the MBP having copied them from Windows. From the terminal window, I can see that Rails and Ruby are installed as advertised (--version works). For now, I am happy wth Ruby 1.8.6 and Rails 1.2.6 that are on there. HOWEVER, when I try "ruby script/ server" or "ruby script/console" I keep getting the following error. Cannot find gem for Rails ~>1.2.3.0: Install the missing gem with ''gem install -v=1.2.3 rails'', or change environment.rb to define RAILS_GEM_VERSION with your desired version. What am I missing? Isn''t all the "basic" stuff preinstalled out of the box? The project I am trying to run is very simple - no fancy gems or anything. It was also built using 1.8.6 I read this http://developer.apple.com/tools/developonrailsleopard.html but its trying to get me to update and I''d like to stick to 1.8.6 and 1.2.6 since some of my other projects are based on that. Thanks, Roupen N. --~--~---------~--~----~------------~-------~--~----~ 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 16 Mar 2008, at 20:01, nahabed wrote:> A few days ago I got a new Macbook Pro (yippie!). Until now, I was > using Instant Rails on Windows. I am now trying to get my rails > projects to run on the MBP having copied them from Windows. > > From the terminal window, I can see that Rails and Ruby are installed > as advertised (--version works). For now, I am happy wth Ruby 1.8.6 > and Rails 1.2.6 that are on there. HOWEVER, when I try "ruby script/ > server" or "ruby script/console" I keep getting the following error. > > Cannot find gem for Rails ~>1.2.3.0: > Install the missing gem with ''gem install -v=1.2.3 rails'', or > change environment.rb to define RAILS_GEM_VERSION with your > desired version. > > What am I missing? Isn''t all the "basic" stuff preinstalled out of the > box? The project I am trying to run is very simple - no fancy gems or > anything. It was also built using 1.8.6 > > I read this http://developer.apple.com/tools/ > developonrailsleopard.html > but its trying to get me to update and I''d like to stick to 1.8.6 and > 1.2.6 since some of my other projects are based on that.Your environment.rb states Rails 1.2.3 as the version to look for, just change it to 1.2.6 and you''re done. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
[I posted this earlier today but it didn''t show up on the list so i am reposting. Pardon if you seen this already] A few days ago I got a new Macbook Pro (yippie!). Until now, I was using Instant Rails on Windows. I am now trying to get my rails projects to run on the MBP having copied them from Windows. From the terminal window, I can see that Rails and Ruby are installed as advertised (--version works). For now, I am happy with Ruby 1.8.6 and Rails 1.2.6 that are on there. HOWEVER, when I try "ruby script/ server" or "ruby script/console" I keep getting the following error. Cannot find gem for Rails ~>1.2.3.0: Install the missing gem with ''gem install -v=1.2.3 rails'', or change environment.rb to define RAILS_GEM_VERSION with your desired version. What am I missing? Isn''t all the "basic" stuff preinstalled out of the box? The project I am trying to run is very simple - no fancy gems or anything. It was also built using 1.8.6 I read this http://developer.apple.com/tools/developonrailsleopard.html but its trying to get me to update and I''d like to stick to 1.8.6 and 1.2.6 since some of my other projects are based on that. Thanks, Roupen N. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
nahabed wrote:> Cannot find gem for Rails ~>1.2.3.0: > Install the missing gem with ''gem install -v=1.2.3 rails'', or > change environment.rb to define RAILS_GEM_VERSION with your > desired version.Just do what the message tells you: - either install version 1.2.3 with the provided gem command - or change the dependency of your application to the installed 1.2.6 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
nahabed wrote:> Cannot find gem for Rails ~>1.2.3.0: > Install the missing gem with ''gem install -v=1.2.3 rails'', or > change environment.rb to define RAILS_GEM_VERSION with your > desired version.That''s the key. It means that your application has defined the rails version to use in config/environment.rb, which is rails default behaviour when you create a new project. I''d ignore the gem installation and instead update the environment.rb file (or you can set the RAILS_GEM_VERSION environment variable to "1.2.6") Find the line in that file that reads: # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = ''1.2.3'' unless defined? RAILS_GEM_VERSION and change it to read: RAILS_GEM_VERSION = ''1.2.6'' unless defined? RAILS_GEM_VERSION and all should be well again. Mac -- 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 -~----------~----~----~----~------~----~------~--~---
That fixed it - thanks :) On Mar 16, 9:29 pm, Paul Mckibbin <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> nahabedwrote: > > Cannot find gem for Rails ~>1.2.3.0: > > Install the missing gem with ''gem install -v=1.2.3 rails'', or > > change environment.rb to define RAILS_GEM_VERSION with your > > desired version. > > That''s the key. It means that your application has defined the rails > version to use in config/environment.rb, which is rails default > behaviour when you create a new project. I''d ignore the gem installation > and instead update the environment.rb file (or you can set the > RAILS_GEM_VERSION environment variable to "1.2.6") > > Find the line in that file that reads: > > # Specifies gem version of Rails to use when vendor/rails is not present > RAILS_GEM_VERSION = ''1.2.3'' unless defined? RAILS_GEM_VERSION > > and change it to read: > > RAILS_GEM_VERSION = ''1.2.6'' unless defined? RAILS_GEM_VERSION > > and all should be well again. > > Mac > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---