From: "Michael T. Richter" Date: 2008-04-27T23:54:45+09:00 Subject: Shattered gems? --=-zwKgTQOzwP2v65ODlW+O Content-Type: multipart/alternative; boundary="=-7CE5ryYsZznohWX4zRhI" --=-7CE5ryYsZznohWX4zRhI Content-Type: text/plain Content-Transfer-Encoding: quoted-printable This seems to be a basic thing: run rails under ruby and execute the ensuing system. Every Ruby on Rails books or tutorial does this. Here's what's happening for me: First, here's my version information: michael@isolde:~/Development/Rails$ rails --version Rails 2.0.2 michael@isolde:~/Development/Rails$ ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] Here are the gems I have installed: michael@isolde:~/Development/Rails$ gem list --local *** LOCAL GEMS *** actionmailer (2.0.2.9216, 2.0.2) actionpack (2.0.2.9216, 2.0.2) activerecord (2.0.2.9216, 2.0.2) activeresource (2.0.2.9216, 2.0.2) activesupport (2.0.2.9216, 2.0.2) blow (0.3.6) BlueCloth (1.0.0) builder (2.1.2) camping (1.5) camping_generator (0.2.0) cgi_multipart_eof_fix (2.5.0) daemons (1.0.10, 1.0.9, 0.4.2) english (0.2.0) englishext (0.1.1) erlectricity (0.2.0, 0.1.0) facets (2.4.1, 2.3.0, 1.4.5) fastthread (1.0.1) fxirb (0.3.1) fxri (0.3.6) fxruby (1.6.14, 1.6.13) gem_plugin (0.2.3) gen (0.41.0) glue (0.41.0) hoe (1.5.1) json (1.1.2) markaby (0.5) metaid (1.0) mongrel (1.1.4) nitro (0.41.0) og (0.41.0) rails (2.0.2.9216, 2.0.2) rake (0.8.1) rdoc (2.0.0) RedCloth (3.0.4) rio (0.4.1) rmovie (0.5.1) ruby-breakpoint (0.5.1, 0.5.0) rubyforge (0.4.5) rubygems-update (1.1.1, 1.1.0) sqlite3-ruby (1.2.1) stick (1.3.3) wxruby (1.9.5) Here's the command and its output: michael@isolde:~/Development/Rails$ rails junk create =20 create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create config/initializers create db create doc create lib create lib/tasks create log create public/images create public/javascripts create public/stylesheets create script/performance create script/process create test/fixtures create test/functional create test/integration create test/unit create vendor create vendor/plugins create tmp/sessions create tmp/sockets create tmp/cache create tmp/pids create Rakefile create README create app/controllers/application.rb create app/helpers/application_helper.rb create test/test_helper.rb create config/database.yml create config/routes.rb create config/initializers/inflections.rb create config/initializers/mime_types.rb create config/initializers/new_rails_defaults.rb create config/boot.rb create config/environment.rb create config/environments/production.rb create config/environments/development.rb create config/environments/test.rb create script/about create script/console create script/destroy create script/generate create script/performance/benchmarker create script/performance/profiler create script/performance/request create script/process/reaper create script/process/spawner create script/process/inspector create script/runner create script/server create script/plugin create public/dispatch.rb create public/dispatch.cgi create public/dispatch.fcgi create public/404.html create public/422.html create public/500.html create public/index.html create public/favicon.ico create public/robots.txt create public/images/rails.png create public/javascripts/prototype.js create public/javascripts/effects.js create public/javascripts/dragdrop.js create public/javascripts/controls.js create public/javascripts/application.js create doc/README_FOR_APP create log/server.log create log/production.log create log/development.log create log/test.log Here's my sanity check: michael@isolde:~/Development/Rails$ cd junk michael@isolde:~/Development/Rails/junk$ ruby script/server=20 =3D> Booting Mongrel (use 'script/server webrick' to force WEBrick) =3D> Rails application starting on http://0.0.0.0:3000 =3D> Call with -d to detach =3D> Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Exiting /home/michael/Development/Rails/junk/config/environment.rb:44: undefined method `time_zone=3D' for # (NoMethodError) from /home/michael/software/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initiali= zer.rb:47:in `run' from /home/michael/Development/Rails/junk/config/environment.rb:13 from /home/michael/software/lib/ruby/site_ruby/1.8/rubygems/custom_require.= rb:27:in `gem_original_require' from /home/michael/software/lib/ruby/site_ruby/1.8/rubygems/custom_require.= rb:27:in `require' from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/= active_support/dependencies.rb:496:in `require' from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/= active_support/dependencies.rb:342:in `new_constants_in' from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/= active_support/dependencies.rb:496:in `require' from /home/michael/software/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib= /mongrel/rails.rb:147:in `rails' ... 20 levels... from /home/michael/software/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands= /server.rb:39 from /home/michael/software/lib/ruby/site_ruby/1.8/rubygems/custom_require.= rb:27:in `gem_original_require' from /home/michael/software/lib/ruby/site_ruby/1.8/rubygems/custom_require.= rb:27:in `require' from script/server:3 And here's my proof that I'm up-to-date with my gems: michael@isolde:~/Development/Rails/junk$ gem update Updating installed gems Bulk updating Gem source index for: http://gems.rubyonrails.org/ Nothing to update I'm really stumped as to where to go from here. There's no hint I can find as to what the problem actually is except that, obviously, something, somewhere is breaking a pretty much bog-standard Rails2 installation right out of the box. How do I go about debugging this? (Looking at the file that creates the error message shows me nothing meaningful.) --=20 Michael T. Richter (GoogleTalk: ttmrichter@gmail.com) Politics is the art of looking for trouble, finding it whether it exists or not, diagnosing it incorrectly, and applying the wrong remedy. (Ernest Benn) --=-7CE5ryYsZznohWX4zRhI Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable This seems to be a basic thing: run rails under ruby and execute the ensuin= g system.  Every Ruby on Rails books or tutorial does this.  Here= 's what's happening for me:

First, here's my version information:

michael@isolde:~/Development/Rails$ rails --version
Rails 2.0.2
michael@isolde:~/Development/Rails$ ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]

Here are the gems I have installed:

michael@isolde:~/Development/Rails$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.0.2.9216, 2.0.2)
actionpack (2.0.2.9216, 2.0.2)
activerecord (2.0.2.9216, 2.0.2)
activeresource (2.0.2.9216, 2.0.2)
activesupport (2.0.2.9216, 2.0.2)
blow (0.3.6)
BlueCloth (1.0.0)
builder (2.1.2)
camping (1.5)
camping_generator (0.2.0)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10, 1.0.9, 0.4.2)
english (0.2.0)
englishext (0.1.1)
erlectricity (0.2.0, 0.1.0)
facets (2.4.1, 2.3.0, 1.4.5)
fastthread (1.0.1)
fxirb (0.3.1)
fxri (0.3.6)
fxruby (1.6.14, 1.6.13)
gem_plugin (0.2.3)
gen (0.41.0)
glue (0.41.0)
hoe (1.5.1)
json (1.1.2)
markaby (0.5)
metaid (1.0)
mongrel (1.1.4)
nitro (0.41.0)
og (0.41.0)
rails (2.0.2.9216, 2.0.2)
rake (0.8.1)
rdoc (2.0.0)
RedCloth (3.0.4)
rio (0.4.1)
rmovie (0.5.1)
ruby-breakpoint (0.5.1, 0.5.0)
rubyforge (0.4.5)
rubygems-update (1.1.1, 1.1.0)
sqlite3-ruby (1.2.1)
stick (1.3.3)
wxruby (1.9.5)

Here's the command and its output:

michael@isolde:~/Development/Rails$ rails junk
      create 
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments       create  config/initializers       create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  script/process
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application= .rb
      create  app/helpers/application_hel= per.rb
      create  test/test_helper.rb       create  config/database.yml       create  config/routes.rb
      create  config/initializers/inflect= ions.rb
      create  config/initializers/mime_ty= pes.rb
      create  config/initializers/new_rai= ls_defaults.rb
      create  config/boot.rb
      create  config/environment.rb<= BR>       create  config/environments/product= ion.rb
      create  config/environments/develop= ment.rb
      create  config/environments/test.rb=
      create  script/about
      create  script/console
      create  script/destroy
      create  script/generate
      create  script/performance/benchmar= ker
      create  script/performance/profiler=
      create  script/performance/request<= /TT>
      create  script/process/reaper<= BR>       create  script/process/spawner=
      create  script/process/inspector
      create  script/runner
      create  script/server
      create  script/plugin
      create  public/dispatch.rb
      create  public/dispatch.cgi       create  public/dispatch.fcgi       create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototyp= e.js
      create  public/javascripts/effects.= js
      create  public/javascripts/dragdrop= .js
      create  public/javascripts/controls= .js
      create  public/javascripts/applicat= ion.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log       create  log/test.log

Here's my sanity check:

michael@isolde:~/Development/Rails$ cd junk
michael@isolde:~/Development/Rails/junk$ ruby script/server
=3D> Booting Mongrel (use 'script/server webrick' to force WEBrick)<= /TT>
=3D> Rails application starting on h= ttp://0.0.0.0:3000
=3D> Call with -d to detach
=3D> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/home/michael/Development/Rails/junk/config/environment.rb:44: undefine= d method `time_zone=3D' for #<Rails::Configuration:0xb6fd60a4> (NoMet= hodError)
        from /home/michael/software/= lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in `run'
        from /home/michael/Developme= nt/Rails/junk/config/environment.rb:13
        from /home/michael/software/= lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_requi= re'
        from /home/michael/software/= lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /home/michael/software/= lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.= rb:496:in `require'
        from /home/michael/software/= lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.= rb:342:in `new_constants_in'
        from /home/michael/software/= lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.= rb:496:in `require'
        from /home/michael/software/= lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:147:in `ra= ils'
         ... 20 levels...<= BR>         from /home/michael/software/= lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
        from /home/michael/software/= lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_requi= re'
        from /home/michael/software/= lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from script/server:3
And here's my proof that I'm up-to-date with my gems:

michael@isolde:~/Development/Rails/junk$ gem update
Updating installed gems
Bulk updating Gem source index for: http://gems.rubyonrails.org/
Nothing to update

I'm really stumped as to where to go from here.  There's no hint I can= find as to what the problem actually is except that, obviously, something,= somewhere is breaking a pretty much bog-standard Rails2 installation right= out of the box.  How do I go about debugging this?  (Looking at = the file that creates the error message shows me nothing meaningful.)

--
Michael T. Richter <ttmri= chter@gmail.com> (GoogleTalk: ttmrichter@gmail.com)
Politics is the art of looking for trouble, finding it whether it exists= or not, diagnosing it incorrectly, and applying the wrong remedy. (Ernest = Benn)
--=-7CE5ryYsZznohWX4zRhI-- --=-zwKgTQOzwP2v65ODlW+O Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIFJObLqyWkKVQ54QRAqOFAJ9wDO6vC19vwiu0UJIqSMrQjBEelgCglC3e cvcAuNBLXOyujpTB7wh1gC0= =sisg -----END PGP SIGNATURE----- --=-zwKgTQOzwP2v65ODlW+O--