Ruby Forum Ruby > Shattered gems?

Posted by Michael T. Richter (Guest)
on 27.04.2008 16:56
Attachment: signature.asc (190 Bytes)
(Received via mailing list)
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
      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
=> 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
/home/michael/Development/Rails/junk/config/environment.rb:44: undefined
method `time_zone=' for #<Rails::Configuration:0xb6fd60a4>
(NoMethodError)

from 
/home/michael/software/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.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.)
Posted by Florian Aßmann (Guest)
on 27.04.2008 17:29
(Received via mailing list)
Try to uninstall edge rails and recreate the project. It seems the
rails generator you called is from 2.0.2.9216 but the rails version
that is executed with script/server is version 2.0.2.

Regards
Florian

> 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)
> rails (2.0.2.9216, 2.0.2)
Posted by Michael T. Richter (Guest)
on 27.04.2008 17:41
Attachment: signature.asc (190 Bytes)
(Received via mailing list)
On Mon, 2008-04-28 at 00:28 +0900, Florian Aßmann wrote:

> Try to uninstall edge rails and recreate the project. It seems the  
> rails generator you called is from 2.0.2.9216 but the rails version  
> that is executed with script/server is version 2.0.2.


That does appear to be the problem, but now instead I have a different
problem:

Bulk updating Gem source index for: http://gems.rubyonrails.org/
Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.rubyonrails.org/
ERROR:  While executing gem ... (Gem::RemoteSourceException)
    Error fetching remote gem cache: Errno::EPIPE: Broken pipe reading
http://gems.rubyonrails.org/yaml

The ruby-on-rails gem site is borked.  Again.  Second time this month.
(And why is it bulk updating twice on a single pass of gem?)