问题
I'm using rbenv to set the ruby version.
ruby -v
produces the expected 1.9.3
I can do gem install paperclip
without a problem.
However, when I do bundle install
it says:
Installing paperclip (3.1.2)
Gem::InstallError: paperclip requires Ruby version >= 1.9.2.
An error occured while installing paperclip (3.1.2), and Bundler cannot continue.
Make sure that `gem install paperclip -v '3.1.2'` succeeds before bundling.
but, ruby -v says I'm running 1.9.3. Is bundler runnign as sudo? Have anyone addressed this problem?
回答1:
The problem was permission issues of my rbenv folder. This fixxed it:
sudo chown ubuntu /usr/local/rbenv/rubies -R
I am running ubuntu on AWS.
回答2:
I don't know if it's too late for you guys, but I faced this problem today and was able to solve it by checking the "paperclip" official git page.
For me what solved it was changing the info on the gem file to:
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
Hope it helps you guys!
Regards
Luis
回答3:
The answer is to build ruby 1.9.3 from source. There are instructions on both manually doing this-but then there's always RVM. If you have RVM installed on your machine, use it and NOT the apt-get for ruby versions greater than 1.8
To compile from source manually (not recommended) http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/
If you don't want to build from source, you can follow some instructions on adding a repo. others have hit the same error.
来源:https://stackoverflow.com/questions/11416529/bundle-install-and-ruby-versions