Created
July 8, 2011 02:46
-
-
Save eric-hu/1071005 to your computer and use it in GitHub Desktop.
Some gem executables broken after rvm update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I ran "rvm update 1.8.7-p334 1.8.7-p352" and started encountering | |
# some errors with certain executables. Below I demonstrate how | |
# some gem executables work and some don't | |
$ rake | |
bash: /home/eric/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/rake: /home/eric/.rvm/rubies/ruby-1.8.7-p334/bin/ruby: bad interpreter: No such file or directory | |
# showing my rvm path for gems, replace with yours in the | |
# "cat" lines below | |
$ which rake | |
/home/eric/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/rake | |
# Valid Executables | |
#-------------------------------------------------------------------- | |
# ri: valid output | |
$ ri | |
Enter the method name you want to look up. | |
... | |
# ri: (first line of executable) | |
$ cat ~/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/ri | |
#!/home/eric/.rvm/rubies/ruby-1.8.7-p352/bin/ruby | |
... | |
# cucumber: (File partially loads. Ruby found, Rails not found) | |
$ cucumber | |
Using the default profile... | |
no such file to load -- rails (LoadError) | |
# cucumber: (first line of executable, inconsistent with above) | |
$ cat ~/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/cucumber | |
#!/usr/bin/env ruby | |
... | |
# Broken files | |
#--------------------------------------------------------------------- | |
# rake : (broken, first line of executable) | |
$ cat ~/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/rake | |
#!/home/eric/.rvm/rubies/ruby-1.8.7-p334/bin/ruby | |
... | |
# bundle : (broken, first line of executable) | |
$ cat ~/.rvm/gems/ruby-1.8.7-p352@ykiw/bin/bundle | |
#!/home/eric/.rvm/rubies/ruby-1.8.7-p334/bin/ruby | |
... | |
# Other notes | |
#--------------------------------------------------------------------- | |
# I was able to fix the bundler path by running "gem install bundler", | |
# which updated bundler to the newest version. I presume that if | |
# bundler was already up to date, this may not have worked. | |
# | |
# From what I've read, RubyGems makes these convenience executables | |
# upon "gem install". I don't understand the discrepancy in the | |
# ruby path interpreter for different files, though. Perhaps this | |
# has to do with configurations chosen by the gem authors? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment