How do I uninstall bundler on AWS (& difference btw local and system wide gems)-Collection of common programming errors
When I run bundle install
on my AWS instance, I get this syntax error on my gemfile:
Gemfile syntax error:
/var/www/mheesen.cc/releases/20131206072125/Gemfile:18: syntax error,
unexpected ':', expecting kEND
...tter-bootstrap-rails', github: 'seyhunak/twitter-bootstrap-r...
^
This is an error typically associated with me having Ruby 1.8 installed, but by typing ruby -v
I get ruby 1.9.3
.
Digging a little further, I read “error in your Gemfile, and Bundler cannot continue”, and figured that it could be because my bundler is using a system Ruby rather than a local one. (I’m not exactly sure how that works, but oh well.)
I thought the best remedy was to uninstall the bundler
gem and reinstall it and hopefully it will pick up the right bundler with the right Ruby version but trying to uninstall on my project directory gives me this error:
path/to/my/project$ gem uninstall bundler
ERROR: While executing gem ... (Gem::InstallError)
bundler is not installed in GEM_HOME, try:
gem uninstall -i /usr/local/rvm/gems/ruby-1.9.3-p484@global bundler
This confirms my suspicion that it’s using a system-wide bundler, but then trying to uninstall that system-wide bundler gives me a permission error:
gem uninstall -i /usr/local/rvm/gems/ruby-1.9.3-p484@global bundler
Remove executables:
bundle
in addition to the gem? [Yn] Y
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the
/usr/local/rvm/gems/ruby-1.9.3-p484@global/bin directory.
I tried changing the permissions on the said folder.. didn’t have the permissions to do that either.
Trying to update bundler on my project also tells me that everything is up to date.
What do I do now? What are my options? I’m running out of ideas.