Ruby Forum Ruby on Rails > Errors with script/server and script/generate controller

Posted by A_ Fan (nbafan)
on 09.05.2008 07:39
I have two errors with script/server and script/generate controller. Can
anyone help me fix them?

With ruby script/server i'm getting this error:
(I've tried to force WEBrick... but it didn't work).


C:\InstantRails\rails_apps\demo>ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
C:/InstantRails/rails_apps/demo/config/environment.rb:44: undefined
method `time
_zone=' for #<Rails::Configuration:0x317863c> (NoMethodError)
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initial
izer.rb:47:in `run'
        from C:/InstantRails/rails_apps/demo/config/environment.rb:13
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:496:in `require'
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:342:in `new_constants_in'
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:496:in `require'
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin
32/bin/../lib/mongrel/rails.rb:147:in `rails'
         ... 20 levels...
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/command
s/server.rb:39
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from script/server:3

C:\InstantRails\rails_apps\demo>











I'm getting this error with script/generate controller:

C:\InstantRails\rails_apps\demo>ruby script/generate controller Say
C:/InstantRails/rails_apps/demo/config/environment.rb:44: undefined
method `time
_zone=' for #<Rails::Configuration:0x2b5406c> (NoMethodError)
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initial
izer.rb:47:in `run'
        from C:/InstantRails/rails_apps/demo/config/environment.rb:13
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/command
s/generate.rb:1
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from script/generate:3

C:\InstantRails\rails_apps\demo>
Posted by Frederick Cheung (Guest)
on 09.05.2008 09:40
(Received via mailing list)
Short version: aptana/radrails has probably messed with your gems
Long version (because I got tired of repeating myself):
http://www.spacevatican.org/2008/5/9/when-aptana-messes-with-your-gems

Fred
Posted by A_ Fan (nbafan)
on 09.05.2008 18:03
Frederick Cheung wrote:
> Short version: aptana/radrails has probably messed with your gems
> Long version (because I got tired of repeating myself):
> http://www.spacevatican.org/2008/5/9/when-aptana-messes-with-your-gems
> 
> Fred



Thanks. I uninstalled Aptana and removed the gems that ended in .9216, 
and am still getting an error:

C:\InstantRails\rails_apps\demo>ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
C:/InstantRails/rails_apps/demo/config/environment.rb:44: undefined 
method `time
_zone=' for #<Rails::Configuration:0x31fd9cc> (NoMethodError)
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initial
izer.rb:47:in `run'
        from C:/InstantRails/rails_apps/demo/config/environment.rb:13
        from 
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from 
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:496:in `require'
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:342:in `new_constants_in'
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib
/active_support/dependencies.rb:496:in `require'
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin
32/bin/../lib/mongrel/rails.rb:147:in `rails'
         ... 20 levels...
        from 
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/command
s/server.rb:39
        from 
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `gem_original_require'
        from 
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
.rb:27:in `require'
        from script/server:3

C:\InstantRails\rails_apps\demo>



This is my list of gems:
actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2)
capistrano (2.1.0)
cgi_multipart_eof_fix (2.5.0)
cmdparse (2.0.2)
fxri (0.3.6)
fxruby (1.6.12)
gem_plugin (0.2.3)
highline (1.4.0)
hpricot (0.6)
log4r (1.0.5)
mongrel (1.1.2)
mysql (2.7.3)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
rails (2.0.2)
rake (0.8.1)
ruby-debug-base (0.10.0)
ruby-debug-ide (0.1.10)
rubygems-update (1.1.1)
sources (0.0.1)
sqlite3-ruby (1.2.1)
win32-api (1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4)
win32-file-stat (1.2.7)
win32-process (0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.0)
windows-pr (0.7.2)
Posted by Frederick Cheung (Guest)
on 09.05.2008 18:39
(Received via mailing list)
On May 9, 5:03 pm, A_ Fan <rails-mailing-l...@andreas-s.net> wrote:
> Frederick Cheung wrote:
> > Short version: aptana/radrails has probably messed with your gems
> > Long version (because I got tired of repeating myself):
> >http://www.spacevatican.org/2008/5/9/when-aptana-messes-with-your-gems
>
> > Fred
>
> Thanks. I uninstalled Aptana and removed the gems that ended in .9216,
> and am still getting an error:
>
regenerate your app: the generated app still references the bad stuff.
Posted by A_ Fan (nbafan)
on 09.05.2008 22:32
Frederick Cheung wrote:
> On May 9, 5:03?pm, A_ Fan <rails-mailing-l...@andreas-s.net> wrote:
>> Frederick Cheung wrote:
>> > Short version: aptana/radrails has probably messed with your gems
>> > Long version (because I got tired of repeating myself):
>> >http://www.spacevatican.org/2008/5/9/when-aptana-messes-with-your-gems
>>
>> > Fred
>>
>> Thanks. I uninstalled Aptana and removed the gems that ended in .9216,
>> and am still getting an error:
>>
> regenerate your app: the generated app still references the bad stuff.

I made a new application and it works. However, regarding the app 
mentioned, how do I regenerate it?
Thanks a lot!
Posted by Frederick Cheung (Guest)
on 10.05.2008 18:52
(Received via mailing list)
On 9 May 2008, at 21:32, A_ Fan wrote:

>>> Thanks. I uninstalled Aptana and removed the gems that ended in . 
>>> 9216,
>>> and am still getting an error:
>>>
>> regenerate your app: the generated app still references the bad  
>> stuff.
>
> I made a new application and it works. However, regarding the app
> mentioned, how do I regenerate it?
> Thanks a lot!
By regenerate I meant actually create it again.
rake rails:update might work.

Fred