Nick Ginanto
Nick Ginanto

Reputation: 32120

Bundle exec doesn't work

I am trying to use rails-erd. The last time I used it was in February and worked fine

I tried using erd and bundle exec erd

I am getting this error.. I have rails 4 in another project, but in this project I use rails 3.2.15 in the gem file

Loading application in 'my_app'...
WARN: Unresolved specs during Gem::Specification.reset:
      activerecord (>= 3.0)
      i18n (>= 0.6.4, ~> 0.6)
      multi_json (~> 1.3)
      tzinfo (~> 0.3.37)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Failed: Gem::LoadError: You have already activated activesupport 4.0.0, but your Gemfile requires activesupport 3.2.15. Using bundle exec may solve this.

What does this mean and how do I solve this?

Upvotes: 0

Views: 602

Answers (2)

shrikant1712
shrikant1712

Reputation: 4446

The error shows that you have already activated activesupport 4.0.0 but in your gemfile.lock file the version of the activesupport is 3.2.15. So simply delete the gemfile.lock file and again bundle install It will take the latest version of activesupportor, or either you can change the version manually.

Upvotes: 2

Kumar Akarsh
Kumar Akarsh

Reputation: 4980

In the Gemfile of the app specify the version of Rails if you haven't done so:

gem 'rails', '3.2.15'

Run bundle install then try running the script again using bundle exec.

If it still doesn't work try uninstalling rails 4 and then running it.

gem uninstall rails

Ideally if you're executing your script with bundle exec it always execute the script in the context of the current bundle using the Gemfile.

Upvotes: 0

Related Questions