Shadowdev Shadowdev
2008-Apr-01 22:49 UTC
Help running new application, Webrick not starting properly
Hello All,
I''ve installed ruby 1.8.6, Gems 1.1.0, Rails 2.0.2. I''ve
installed
sqlite3 dll, reg, & exe in the ruby/bin directory and all "seems"
installed properly. So the problem is this; I run ''rails
appname'' and it
generates the structure no problem. Then immediately thereafter I try to
run from the ''appname'' directory ''ruby
scritpt/server'' just to see if
the webrick server will start up. But it doesn''t, instead I get the
error below. Consequently the server does not start, thus the problem.
I do have a copy of InstantRails-2 that seems to work just fine; I can
''Manage Rails Applications'' start a ''Create Rails
Application'' console
then run ''rails appname'' and then immediately run the server,
which does
start and run (http://localhost:3000/ resolves with standard
''Rails''
greeting, yet should I browse to http://localhost:3000/appname I get the
following error; No route matches "/newapp" with {:method=>:get}
Several questions come to mind.
1. Does a fresh ''rails appname'' application, actually require
a database
to be running to start the webserver.
2. Is this a pathing problem in the windows console started from the
''Start''>Programs>Accessories>Command Prompt
3. I run realize that I need to run ''scaffold'' or
''generate'' something
after the ''rails appname'' command, but shouldn''t the
webserver start
nonetheless?
~~~~~~~~
C:\ruby\appname>ruby script/server
=> Booting WEBrick...
C:/ruby/appname/config/environment.rb:38: undefined method `time_zone=''
for #<Rails::Configuration:0x2ba4ecc> (NoMethodE
rror)
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in
`run''
from C:/ruby/appname/config/environment.rb:13
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants
_in''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/webrick.rb:59
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants
_in''
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from script/server:3
C:\ruby\appname>
~~~~~~~~
Many Thanks
SD
--
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
-~----------~----~----~----~------~----~------~--~---
Shadow Dev
2008-Apr-02 02:17 UTC
Re: Help running new application, Webrick not starting prope
bump -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Apr-02 09:58 UTC
Re: Help running new application, Webrick not starting properly
On 1 Apr 2008, at 23:49, Shadowdev Shadowdev wrote:> > Hello All, > I''ve installed ruby 1.8.6, Gems 1.1.0, Rails 2.0.2. I''ve installed > sqlite3 dll, reg, & exe in the ruby/bin directory and all "seems" > installed properly. So the problem is this; I run ''rails appname'' > and it > generates the structure no problem. Then immediately thereafter I > try to > run from the ''appname'' directory ''ruby scritpt/server'' just to see if > the webrick server will start up. But it doesn''t, instead I get the > error below. Consequently the server does not start, thus the problem. > I do have a copy of InstantRails-2 that seems to work just fine; I can > ''Manage Rails Applications'' start a ''Create Rails Application'' console > then run ''rails appname'' and then immediately run the server, which > does > start and run (http://localhost:3000/ resolves with standard ''Rails'' > greeting, yet should I browse to http://localhost:3000/appname I get > the > following error; No route matches "/newapp" with {:method=>:get} > > Several questions come to mind. > 1. Does a fresh ''rails appname'' application, actually require a > database > to be running to start the webserver. > 2. Is this a pathing problem in the windows console started from the > ''Start''>Programs>Accessories>Command Prompt > 3. I run realize that I need to run ''scaffold'' or ''generate'' something > after the ''rails appname'' command, but shouldn''t the webserver start > nonetheless? >What in environment.rb on line 38 ? Fred> ~~~~~~~~ > C:\ruby\appname>ruby script/server > => Booting WEBrick... > C:/ruby/appname/config/environment.rb:38: undefined method > `time_zone='' > for #<Rails::Configuration:0x2ba4ecc> (NoMethodE > rror) > from > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in > `run'' > from C:/ruby/appname/config/environment.rb:13 > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:342:in > `new_constants > _in'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ > webrick.rb:59 > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:342:in > `new_constants > _in'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in > `require'' > from > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from script/server:3 > > C:\ruby\appname> > ~~~~~~~~ > > Many Thanks > SD > -- > 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 -~----------~----~----~----~------~----~------~--~---
Vapor ..
2008-Apr-02 11:00 UTC
Re: Help running new application, Webrick not starting prope
> C:\ruby\appname>ruby script/server > => Booting WEBrick... > C:/ruby/appname/config/environment.rb:38: undefined method `time_zone='' > for #<Rails::Configuration:0x2ba4ecc> (NoMethodE > rror)You can set your time zone by replacing 38th line in your environment with... config.active_record.default_timezone = :utc -- 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 -~----------~----~----~----~------~----~------~--~---
Shadow Dev
2008-Apr-02 13:24 UTC
Re: Help running new application, Webrick not starting prope
Vapor .. wrote:>> C:\ruby\appname>ruby script/server >> => Booting WEBrick... >> C:/ruby/appname/config/environment.rb:38: undefined method `time_zone='' >> for #<Rails::Configuration:0x2ba4ecc> (NoMethodE >> rror) > > You can set your time zone by replacing 38th line in your environment > with... config.active_record.default_timezone = :utcHi Vapor, Hi Fred, Thank you both for the help. Vapor, I cut and paste the line above into the env...rb file and it''s working. Many, Many Thanks SD -- 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 Apr 2, 4:00 am, "Vapor .." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > C:\ruby\appname>ruby script/server > > => Booting WEBrick... > > C:/ruby/appname/config/environment.rb:38: undefined method `time_zone='' > > for #<Rails::Configuration:0x2ba4ecc> (NoMethodE > > rror) > > You can set your time zone by replacing 38th line in your environment > with... config.active_record.default_timezone = :utc > -- > Posted viahttp://www.ruby-forum.com/.The question is why is the environment.rb template file in gems/ rails-2.0.2.xxxx/environments still referencing config.time_zone rather than config.active_record.default_timezone? Shouldn''t this be reported as an issue? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---