Hi Strange thing happens when i run rails project it makes project but when i run script/generate or script/server it writes Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. so rails -v gives Rails 2.3.5 How to fix that kind of problem ? i use mac and my "gem environment" is RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-9 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/boris/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What does the environment.rb show as the rails version? On Jan 12, 10:40 am, Boris Bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > Strange thing happens when i run rails project it makes project but when > i run script/generate or script/server it writes > > Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update > your RAILS_GEM_VERSION setting in config/environment.rb for the Rails > version you do have installed, or comment out RAILS_GEM_VERSION to use > the latest version installed. > > so rails -v gives Rails 2.3.5 > > How to fix that kind of problem ? i use mac and my "gem environment" is > > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.5 > - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) > [universal-darwin9.0] > - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 > - RUBY EXECUTABLE: > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > - EXECUTABLE DIRECTORY: /usr/bin > - RUBYGEMS PLATFORMS: > - ruby > - universal-darwin-9 > - GEM PATHS: > - /Library/Ruby/Gems/1.8 > - /Users/boris/.gem/ruby/1.8 > - > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1. 8 > - GEM CONFIGURATION: > - :update_sources => true > - :verbose => true > - :benchmark => false > - :backtrace => false > - :bulk_threshold => 1000 > - REMOTE SOURCES: > -http://gems.rubyforge.org/ > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Habgood wrote:> What does the environment.rb show as the rails version?# Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = ''2.3.5'' unless defined? RAILS_GEM_VERSION -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rodrigo Dellacqua
2010-Jan-12 20:56 UTC
Re: Re: script/generate not working ! while rails do
This happened to me yesterday too. Weird, did you install any gems before that? I had a couple gems installed I think that something broke up that =/ []''s Rodrigo Dellacqua On Tue, Jan 12, 2010 at 2:52 PM, Boris Bob <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Chris Habgood wrote: > > What does the environment.rb show as the rails version? > > # Specifies gem version of Rails to use when vendor/rails is not present > RAILS_GEM_VERSION = ''2.3.5'' unless defined? RAILS_GEM_VERSION > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/1/12 Boris Bob <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Hi > Strange thing happens when i run rails project it makes project but when > i run script/generate or script/server it writes > > Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update > your RAILS_GEM_VERSION setting in config/environment.rb for the Rails > version you do have installed, or comment out RAILS_GEM_VERSION to use > the latest version installed. > > so rails -v gives Rails 2.3.5I can''t help much not being a mac man, but I believe that this can happen if rails is installed twice in different places. Google for ''missing the rails gem'' might help. Colin> > How to fix that kind of problem ? i use mac and my "gem environment" is > > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.5 > - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) > [universal-darwin9.0] > - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 > - RUBY EXECUTABLE: > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > - EXECUTABLE DIRECTORY: /usr/bin > - RUBYGEMS PLATFORMS: > - ruby > - universal-darwin-9 > - GEM PATHS: > - /Library/Ruby/Gems/1.8 > - /Users/boris/.gem/ruby/1.8 > - > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 > - GEM CONFIGURATION: > - :update_sources => true > - :verbose => true > - :benchmark => false > - :backtrace => false > - :bulk_threshold => 1000 > - REMOTE SOURCES: > - http://gems.rubyforge.org/ > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. > > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> 2010/1/12 Boris Bob <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> Hi >> Strange thing happens when i run rails project it makes project but when >> i run script/generate or script/server it writes >> >> Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update >> your RAILS_GEM_VERSION setting in config/environment.rb for the Rails >> version you do have installed, or comment out RAILS_GEM_VERSION to use >> the latest version installed. >> >> so rails -v gives Rails 2.3.5 > > I can''t help much not being a mac man, but I believe that this can > happen if rails is installed twice in different places. Google for > ''missing the rails gem'' might help. > > ColinExactly, i have 1.2.3 1.2.6 installed to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 and 2.3.5 version here /Library/Ruby/Gems/1.8 don''t know what default is - i guess it''s /Library/Ruby/Gems/1.8 i removed files from that directory /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 but it didn''t help. So in file "server" (script/server) we have 2 lines of code #!/usr/bin/env ruby require File.expand_path(''../../config/boot'', __FILE__) require ''commands/server'' first line load boot file and in booot file we have that line that loads gems class GemBoot < Boot def load_initializer self.class.load_rubygems load_rails_gem require ''initializer'' end def load_rails_gem if version = self.class.gem_version gem ''rails'', version else gem ''rails'' end rescue Gem::LoadError => load_error $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_$ exit 1 end i am not an expert in ruby so far but i guess this function returns false "load_rails_gem" and this expression returns false "gem ''rails''" so it''s a gem method but what it''s doing ? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 12, 11:40 am, Boris Bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > Strange thing happens when i run rails project it makes project but when > i run script/generate or script/server it writes > > Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update > your RAILS_GEM_VERSION setting in config/environment.rb for the Rails > version you do have installed, or comment out RAILS_GEM_VERSION to use > the latest version installed. > > so rails -v gives Rails 2.3.5 > > How to fix that kind of problem ? i use mac and my "gem environment" is >Can you post the output of ''gem list --local''? I''m guessing that you''re missing one of the dependencies somehow. --Matt Jones -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Matt Jones wrote:> On Jan 12, 11:40 am, Boris Bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >> How to fix that kind of problem ? i use mac and my "gem environment" is >> > > Can you post the output of ''gem list --local''? I''m guessing that > you''re missing one of the dependencies somehow. > > --Matt Jonesgem list --local *** LOCAL GEMS *** actionmailer (2.3.5, 1.3.6, 1.3.3) actionpack (2.3.5, 1.13.6, 1.13.3) actionwebservice (1.2.6, 1.2.3) activerecord (2.3.5, 1.15.6, 1.15.3) activeresource (2.3.5) activesupport (2.3.5, 1.4.4, 1.4.2) acts_as_ferret (0.4.4, 0.4.1) capistrano (2.5.13, 2.0.0) cgi_multipart_eof_fix (2.5.0, 2.2) daemons (1.0.10, 1.0.9, 1.0.7) dnssd (1.3.1, 0.6.0) fastthread (1.0.7, 1.0.1, 1.0) fcgi (0.8.8, 0.8.7) ferret (0.11.6, 0.11.4) gem_plugin (0.2.3, 0.2.2) git (1.2.5) highline (1.5.1, 1.2.9) hpricot (0.8.2, 0.6) libxml-ruby (0.3.8.4) mongrel (1.1.4, 1.0.1) needle (1.3.0) net-scp (1.0.2) net-sftp (2.0.4, 1.1.0) net-ssh (2.0.17, 1.1.2) net-ssh-gateway (1.0.1) rack (1.0.1) rails (2.3.5, 1.2.6, 1.2.3) rake (0.8.7, 0.7.3) RedCloth (4.2.2, 3.0.4) ruby-openid (1.1.4) ruby-yadis (0.3.4) rubygems-update (1.3.5) rubynode (0.1.3) sources (0.0.1) sqlite3-ruby (1.2.1) termios (0.9.4) gem dependency rails Gem rails-1.2.3 rake (>= 0.7.2, runtime) activesupport (= 1.4.2, runtime) activerecord (= 1.15.3, runtime) actionpack (= 1.13.3, runtime) actionmailer (= 1.3.3, runtime) actionwebservice (= 1.2.3, runtime) Gem rails-1.2.6 rake (>= 0.7.2, runtime) activesupport (= 1.4.4, runtime) activerecord (= 1.15.6, runtime) actionpack (= 1.13.6, runtime) actionmailer (= 1.3.6, runtime) actionwebservice (= 1.2.6, runtime) Gem rails-2.3.5 rake (>= 0.8.3, runtime) activesupport (= 2.3.5, runtime) activerecord (= 2.3.5, runtime) actionpack (= 2.3.5, runtime) actionmailer (= 2.3.5, runtime) activeresource (= 2.3.5, runtime) -- Posted via http://www.ruby-forum.com/. --001485f3c20a1b98bd047d128b19 Content-Type: text/plain; charset=ISO-8859-1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --001485f3c20a1b98bd047d128b19--
On Jan 13, 4:35 pm, Boris Bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Matt Jones wrote: > > On Jan 12, 11:40 am, Boris Bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > >> How to fix that kind of problem ? i use mac and my "gem environment" is > > > Can you post the output of ''gem list --local''? I''m guessing that > > you''re missing one of the dependencies somehow. > > > --Matt Jones > > gem list --local > > *** LOCAL GEMS *** >[snip] Well, that was a wash. I don''t see anything missing on the list; as others have noted, do you happen to have a second Ruby installed? Try running ''/usr/bin/env ruby''. --Matt Jones -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.