Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove ruby, want to reinstall particular version because cannot run, test app, errors #2959

Closed
siwka opened this issue Jul 16, 2014 · 3 comments

Comments

@siwka
Copy link

siwka commented Jul 16, 2014

I can't remove ruby, reinstall ruby, start or test specific rails project using ruby 2.1.0.
How to remove & install new ruby?

Error's Examples:
1.

$ rails s
/Users/user/.rvm/gems/ruby-2.1.0/bin/rails:23:in `load': cannot load such file -- /Users/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/bin/rails (LoadError)
    from /Users/user/.rvm/gems/ruby-2.1.0/bin/rails:23:in `<main>'
    from /Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
$ rvm remove ruby-2.1.0
ruby-2.1.0 - #removing src/ruby-2.1.0..
ruby-2.1.0 - #removing rubies/ruby-2.1.0......................................
Error running '__rvm_rm_rf /Users/user/.rvm/rubies/ruby-2.1.0',
showing last 15 lines of /Users/user/.rvm/log/1405545940_ruby-2.1.0/remove.rubies.log
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.2.1/test: Permission denied
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.2.1/test_all: Permission denied
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.2.1/Y_U_NO_GEMSPEC.md: Permission denied
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.2.1: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/gems: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0/lib: Directory not empty
rm: /Users/user/.rvm/rubies/ruby-2.1.0: Directory not empty
++ typeset ret=1
++ rvm_debug '__rvm_rm_rf error removing target dir '\''/Users/user/.rvm/rubies/ruby-2.1.0'\''.'
++ ((  0  ))
++ return 0
++ return 1

Removing nokogiri would affect other gems

Other attempts to fix:
Unknown ruby string (do not know how to handle): ruby-2.1.0.

@siwka siwka changed the title Can't remove ruby, want to reinstall because cannot run app: railties-4.1.1/bin/rails (LoadError) Can't remove ruby, want to reinstall particular version because cannot run, test app, errors Jul 17, 2014
@siwka siwka closed this as completed Jul 17, 2014
@siwka
Copy link
Author

siwka commented Jul 17, 2014

Fixed: I completely clean out all traces of RVM from my system (https://rvm.io/support/troubleshooting), rebuilt environment for each project.
Works!

@mpapis
Copy link
Member

mpapis commented Jul 17, 2014

the 1st error can be caused by installation of gems broken in half,
the 2nd error is caused by using sudo/rvmsudo/root with gems, use rvm fix-permissions to fix it
as for the last error Unknown ruby string (do not know how to handle): ruby-2.1.0. - this could be possibly fixed, but without seeing what caused it I can not be sure.

@arelenglish
Copy link

👍 Thanks @mpapis

@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants