# Shattered gems?

**URL:** <https://rubytalk.org/t/shattered-gems/46148>\
**Category:** ruby-talk\
**Created:** [27 April 2008 14:54 UTC](https://rubytalk.org/t/shattered-gems/46148 "2008-04-27T14:54:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_T\_Richter](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Michael\_T\_Richter](https://rubytalk.org/u/Michael_T_Richter)\
**Post date:** [27 April 2008 14:54 UTC](https://rubytalk.org/t/shattered-gems/46148/1 "2008-04-27T14:54:45Z")

</div>

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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/controllers  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/helpers  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/models  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/views/layouts  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/environments  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/initializers  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create db  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create doc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create lib  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create lib/tasks  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create log  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/images  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/stylesheets  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/performance  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/process  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create test/fixtures  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create test/functional  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create test/integration  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create test/unit  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create vendor  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create vendor/plugins  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create tmp/sessions  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create tmp/sockets  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create tmp/cache  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create tmp/pids  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create Rakefile  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create README  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/controllers/application.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create app/helpers/application\_helper.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create test/test\_helper.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/database.yml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/routes.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/initializers/inflections.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/initializers/mime\_types.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/initializers/new\_rails\_defaults.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/boot.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/environment.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/environments/production.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/environments/development.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create config/environments/test.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/about  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/console  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/destroy  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/generate  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/performance/benchmarker  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/performance/profiler  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/performance/request  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/process/reaper  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/process/spawner  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/process/inspector  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/runner  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/server  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create script/plugin  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/dispatch.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/dispatch.cgi  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/dispatch.fcgi  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/404.html  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/422.html  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/500.html  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/index.html  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/favicon.ico  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/robots.txt  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/images/rails.png  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts/prototype.js  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts/effects.js  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts/dragdrop.js  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts/controls.js  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create public/javascripts/application.js  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create doc/README\_FOR\_APP  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create log/server.log  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create log/production.log  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create log/development.log  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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](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'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 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'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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/](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 \<[ttmrichter@gmail.com](mailto:ttmrichter@gmail.com)\> (GoogleTalk:  
> [ttmrichter@gmail.com](mailto: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)

---

<div class="post-metadata">

**Author:** ![Florian\_Assmann2](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@Florian\_Assmann2](https://rubytalk.org/u/Florian_Assmann2)\
**Post date:** [27 April 2008 15:28 UTC](https://rubytalk.org/t/shattered-gems/46148/2 "2008-04-27T15:28:00Z")

</div>

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)
> 
> > /home/michael/Development/Rails/junk/config/environment.rb:44: undefined method `time\_zone=' for #\<Rails::Configuration:0xb6fd60a4\> (NoMethodError)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in `run'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/Development/Rails/junk/config/environment.rb:13  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `gem\_original\_require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:496:in `require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:342:in `new\_constants\_in'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:496:in `require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:147:in `rails'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 20 levels...  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `gem\_original\_require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/michael/software/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from script/server:3

---

<div class="post-metadata">

**Author:** ![Michael\_T\_Richter](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Michael\_T\_Richter](https://rubytalk.org/u/Michael_T_Richter)\
**Post date:** [27 April 2008 15:40 UTC](https://rubytalk.org/t/shattered-gems/46148/3 "2008-04-27T15:40:55Z")

</div>

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/](http://gems.rubyonrails.org/)  
Bulk updating Gem source index for: [http://gems.rubyforge.org/](http://gems.rubyforge.org/)  
Bulk updating Gem source index for: [http://gems.rubyonrails.org/](http://gems.rubyonrails.org/)  
ERROR: While executing gem ... (Gem::RemoteSourceException)  
&nbsp;&nbsp;&nbsp;&nbsp;Error fetching remote gem cache: Errno::EPIPE: Broken pipe reading  
[http://gems.rubyonrails.org/yaml](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?)

> **···**
>
> 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.
> 
> --  
> Michael T. Richter \<ttmrichter@gmail.com\> (GoogleTalk:  
> ttmrichter@gmail.com)  
> We should sell bloat credits, the way the government sells pollution  
> credits. Everybody's assigned a certain amount of bloat, and if they go  
> over, they have to purchase bloat credits from some other group that's  
> been more careful. (Bent Hagemark)
