This project is archived and is in readonly mode.

#3068 ✓invalid
Josh Nichols

undefined constants not giving useful files and line numbers when starting script/server on edge

Reported by Josh Nichols | August 19th, 2009 @ 01:40 AM

I'm trying to port bostonrb.org over to edge, and encountered quite a number of problems just while trying to run script/server. For example, there's this error:

$ script/server 
$ script/server 
=> Booting Mongrel
=> Rails 3.0.pre application starting on http://0.0.0.0:3000
/Users/nichoj/code/active/bostonrb/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/dependencies.rb:116:in `const_missing': uninitialized constant Class::HOST (NameError)
        from /Users/nichoj/code/active/bostonrb/config/../vendor/rails/railties/lib/initializer.rb:219:in `const_get'
        from /Users/nichoj/code/active/bostonrb/config/../vendor/rails/railties/lib/initializer.rb:219
        from /Users/nichoj/code/active/bostonrb/config/../vendor/rails/railties/lib/initializer.rb:218:in `each'
        from /Users/nichoj/code/active/bostonrb/config/../vendor/rails/railties/lib/initializer.rb:218
        from /Users/nichoj/code/active/bostonrb/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:10:in `silence_warnings'
        from /Users/nichoj/code/active/bostonrb/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:21:in `with_warnings'
        from /Users/nichoj/code/active/bostonrb/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:10:in `silence_warnings'
        from /Users/nichoj/code/active/bostonrb/config/../vendor/rails/railties/lib/initializer.rb:207
         ... 10 levels...
        from /Users/nichoj/code/active/bostonrb/vendor/rails/railties/lib/commands/server.rb:76
        from /gentoo/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /gentoo/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from script/server:3

The only references I can find to GOOGLE_MAP_API_KEY are in config/environments/development.rb (and test and production) where it's defined, and in config/initializers/map.rb where it's being used.

config/environments/development.rb:

GOOGLE_MAP_API_KEY = 'ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ'
GeoKit::Geocoders::google = GOOGLE_MAP_API_KEY

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages