RichardOnRails
2010-Feb-20 03:21 UTC
Script/server reference wrong version of initializer.rb
Hi All, In my Rails app RTS, I specify: RAILS_GEM_VERSION = ''2.3.5'' in \RTS\config\environment.rb I have no Windows environment variable named RAILS_GEM_VERSION When I run ruby script/server, I get the error message: K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/ lib/initializer.rb:328:in `send'': undefined method `session='' for ActionController::Base:Class (NoMethodError) Why did the server script reference a rails-1.2.3 gem, rather than a 2.3.5 gem? The 1.2.3 version of initializer.rb uses metaprogramming which likely produced the variable name "session=" which might have been correct in the 1.2.3 context. But the 2.3.5 version of initializer.rb should have been invoked and it looks fine on this score. So, what''s up? TIA, Richard -- 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
2010-Feb-20 08:23 UTC
Re: Script/server reference wrong version of initializer.rb
On 20 February 2010 03:21, RichardOnRails <RichardDummyMailbox58407-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote:> Hi All, > > In my Rails app RTS, I specify: > RAILS_GEM_VERSION = ''2.3.5'' > in \RTS\config\environment.rb > > I have no Windows environment variable named RAILS_GEM_VERSION > > When I run ruby script/server, I get the error message: > > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/ > lib/initializer.rb:328:in `send'': undefined method `session='' for > ActionController::Base:Class (NoMethodError) > > Why did the server script reference a rails-1.2.3 gem, rather than a > 2.3.5 gem? The 1.2.3 version of initializer.rb uses metaprogramming > which likely produced the variable name "session=" which might have > been correct in the 1.2.3 context. But the 2.3.5 version of > initializer.rb should have been invoked and it looks fine on this > score.Have you frozen the earlier version of Rails into your app? Look in your apps vendor folder for a folder rails. If it is there remove it. Colin -- 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.
RichardOnRails
2010-Feb-20 14:32 UTC
Re: Script/server reference wrong version of initializer.rb
Thanks for responding to my plight.> Have you frozen the earlier version of Rails into your app? Look in > your apps vendor folder for a folder rails. If it is there remove it.My app is RTS. The RTS\vendor folder has no files and one empty folder: plugins. Furthermore, I''ve never been sophisticated in Rails to use "freeze". However, I''m new to the 2.0 version and tried to solve problems I had by downloading/executing the Chapter 1 sample from Rippen''s "Pro RoR". It referenced ver. 1.2.3, so I downloaded/installed 1.2.3 yesterday. That led to other problems so I abandoned Rippen''s example. Is it more than coincidence that the problematic version of initializer was 1.2.3?? Again, thanks for looking into my problem, Richard On Feb 20, 3:23 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 20 February 2010 03:21, RichardOnRails > > > > <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: > > Hi All, > > > In my Rails app RTS, I specify: > > RAILS_GEM_VERSION = ''2.3.5'' > > in \RTS\config\environment.rb > > > I have no Windows environment variable named RAILS_GEM_VERSION > > > When I run ruby script/server, I get the error message: > > > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/ > > lib/initializer.rb:328:in `send'': undefined method `session='' for > > ActionController::Base:Class (NoMethodError) > > > Why did the server script reference a rails-1.2.3 gem, rather than a > > 2.3.5 gem? The 1.2.3 version of initializer.rb uses metaprogramming > > which likely produced the variable name "session=" which might have > > been correct in the 1.2.3 context. But the 2.3.5 version of > > initializer.rb should have been invoked and it looks fine on this > > score. > > Have you frozen the earlier version of Rails into your app? Look in > your apps vendor folder for a folder rails. If it is there remove it. > > Colin-- 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.
Colin Law
2010-Feb-20 14:51 UTC
Re: Re: Script/server reference wrong version of initializer.rb
On 20 February 2010 14:32, RichardOnRails <RichardDummyMailbox58407-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote:> Thanks for responding to my plight. > >> Have you frozen the earlier version of Rails into your app? Look in >> your apps vendor folder for a folder rails. If it is there remove it. > > My app is RTS. The RTS\vendor folder has no files and one empty > folder: plugins. Furthermore, I''ve never been sophisticated in > Rails to use "freeze". > > However, I''m new to the 2.0 version and tried to solve problems I had > by downloading/executing the Chapter 1 sample from Rippen''s "Pro > RoR". It referenced ver. 1.2.3, so I downloaded/installed 1.2.3 > yesterday. That led to other problems so I abandoned Rippen''s > example. > > Is it more than coincidence that the problematic version of > initializer was 1.2.3??I am sure it is more than a coincidence. If you do gem list it will show you which versions you have installed. Assuming you no longer need any except the latest versions you can do gem cleanup which will remove all versions except the latest. At the very least that should change the symptom you are having. Colin> > Again, thanks for looking into my problem, > Richard > > On Feb 20, 3:23 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 20 February 2010 03:21, RichardOnRails >> >> >> >> <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: >> > Hi All, >> >> > In my Rails app RTS, I specify: >> > RAILS_GEM_VERSION = ''2.3.5'' >> > in \RTS\config\environment.rb >> >> > I have no Windows environment variable named RAILS_GEM_VERSION >> >> > When I run ruby script/server, I get the error message: >> >> > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/ >> > lib/initializer.rb:328:in `send'': undefined method `session='' for >> > ActionController::Base:Class (NoMethodError) >> >> > Why did the server script reference a rails-1.2.3 gem, rather than a >> > 2.3.5 gem? The 1.2.3 version of initializer.rb uses metaprogramming >> > which likely produced the variable name "session=" which might have >> > been correct in the 1.2.3 context. But the 2.3.5 version of >> > initializer.rb should have been invoked and it looks fine on this >> > score. >> >> Have you frozen the earlier version of Rails into your app? Look in >> your apps vendor folder for a folder rails. If it is there remove it. >> >> Colin > > -- > 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-Feb-20 16:09 UTC
Re: Script/server reference wrong version of initializer.rb
You were right, i.e. it was more than a coincidence. I took a more conservative approach when using your advice: I deleted that 1.2.3 thing directly from Windows Explorer. It took some doing because something was still referencing it although I had no Ruby or Rails stuff running. I think THAT was the real cause of my misadventure. Bottom line: Mongrel came up and localhost:3000 brought up my app. Thank you very much for offering your guidance. Best wishes, Richard On Feb 20, 9:51 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 20 February 2010 14:32, RichardOnRails > > > > <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: > > Thanks for responding to my plight. > > >> Have you frozen the earlier version of Rails into your app? Look in > >> your apps vendor folder for a folder rails. If it is there remove it. > > > My app is RTS. The RTS\vendor folder has no files and one empty > > folder: plugins. Furthermore, I''ve never been sophisticated in > > Rails to use "freeze". > > > However, I''m new to the 2.0 version and tried to solve problems I had > > by downloading/executing the Chapter 1 sample from Rippen''s "Pro > > RoR". It referenced ver. 1.2.3, so I downloaded/installed 1.2.3 > > yesterday. That led to other problems so I abandoned Rippen''s > > example. > > > Is it more than coincidence that the problematic version of > > initializer was 1.2.3?? > > I am sure it is more than a coincidence. If you do > gem list > it will show you which versions you have installed. Assuming you no > longer need any except the latest versions you can do > gem cleanup > which will remove all versions except the latest. At the very least > that should change the symptom you are having. > > Colin > > > > > Again, thanks for looking into my problem, > > Richard > > > On Feb 20, 3:23 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 20 February 2010 03:21, RichardOnRails > > >> <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: > >> > Hi All, > > >> > In my Rails app RTS, I specify: > >> > RAILS_GEM_VERSION = ''2.3.5'' > >> > in \RTS\config\environment.rb > > >> > I have no Windows environment variable named RAILS_GEM_VERSION > > >> > When I run ruby script/server, I get the error message: > > >> > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/ > >> > lib/initializer.rb:328:in `send'': undefined method `session='' for > >> > ActionController::Base:Class (NoMethodError) > > >> > Why did the server script reference a rails-1.2.3 gem, rather than a > >> > 2.3.5 gem? The 1.2.3 version of initializer.rb uses metaprogramming > >> > which likely produced the variable name "session=" which might have > >> > been correct in the 1.2.3 context. But the 2.3.5 version of > >> > initializer.rb should have been invoked and it looks fine on this > >> > score. > > >> Have you frozen the earlier version of Rails into your app? Look in > >> your apps vendor folder for a folder rails. If it is there remove it. > > >> Colin > > > -- > > 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 athttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.