josevalim / enginex

An executable which creates a bare Rails 3 engine (which is used in Crafting Rails Applications)
http://pragprog.com/book/jvrails/crafting-rails-applications
MIT License
441 stars 29 forks source link

already activated: activesupport #25

Open cmeiklejohn opened 13 years ago

cmeiklejohn commented 13 years ago

When running:

enginex new_engine

I'm getting this:

`raise_if_conflicts': can't activate activesupport-3.0.3, already activated activesupport-3.0.9
josevalim commented 13 years ago

Can you please post the full backtrace? Smells like a rubygems bug.

cmeiklejohn commented 13 years ago

Here it is:

/home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1600:in `raise_if_conflicts': can't activate activesupport-3.0.3, already activated activesupport-3.0.9 (Gem::LoadError)
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:737:in `activate'
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:51:in `block in require'
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:50:in `each'
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:50:in `require'
from /home/cmeiklejohn/.rvm/gems/ruby-1.9.2-p136/gems/enginex-0.8.1/lib/enginex.rb:2:in `<top (required)>'
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/cmeiklejohn/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/cmeiklejohn/.rvm/gems/ruby-1.9.2-p136/gems/enginex-0.8.1/bin/enginex:4:in `<top (required)>'
from /home/cmeiklejohn/.rvm/gems/ruby-1.9.2-p136/bin/enginex:19:in `load'
from /home/cmeiklejohn/.rvm/gems/ruby-1.9.2-p136/bin/enginex:19:in `<main>'
contentfree commented 13 years ago

I'm having the same issue. Versions:

ruby: 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0] gem: 1.8.6 rvm: 1.6.31 enginex: 0.8.1

The "already activated" error only seems to show up in a project directory controlled by an .rvmrc. I'm not sure of the interaction there.

Regardless, it is a problem that seems worthwhile to solve since RVM usage is only increasing.

contentfree commented 13 years ago

@cmeiklejohn: The temporary workaround is to edit the local enginex gemspec. Should be at .rvm/gems/<gemset>/specifications/enginex-0.8.1.gemspec – If you change the gemspec to use ~> 3.0.9 then it'll work for now.

cmeiklejohn commented 13 years ago

Thanks. Yeah, I changed the gemspec as well.

josevalim commented 13 years ago

This is very weird. What is worse is that it can only be reproduced if you are have a .rvmrc file?

contentfree commented 13 years ago

I can't prove that, but I went through various projects testing the command and that was a common feature of those that failed. However... today's a new day... and I'm no longer getting the failure (?!)

reasonbock commented 13 years ago

i have this same issue, and i am not using rvm

reasonbock commented 13 years ago

ruby: 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] gem: 1.85 rvm: not installed enginex: 0.8.1

josevalim commented 13 years ago

So it seems everyone is using at least rubygems 1.8.5?

cmeiklejohn commented 13 years ago

Sure seems that way.