I am trying to upgrade to ruby 2.0.0 and I am running into problems getting rvm updated:
Here is my first error trying to update to ruby-2.0.0[-p353]:
Error running 'requirements_smf_update_system ruby-2.0.0[-p353]',
please read /usr/local/rvm/log/1385828966_ruby-2.0.0[-p353]/update_system.log
Requirements installation failed with status: 1.
So I tried:
rvm get stable --auto-dotfiles
And got the following warnings:
Can not update 'scripts/extras/completion.zsh/_rvm', it's a conflict between Zsh
and multiuser installation, prefix the command with 'rvmsudo' to update this file.
but it alerted that install was complete. When I run:
rvm usge:
I get this warning:
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p194/bin' is not
at first place, usually this is caused by shell initialization files - check them for
'PATH=...' entries, it might also help to re-add RVM to your dotfiles:
'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run:
'rvm use ruby-1.9.3-p194'
And I'm going in a circle. I would like to read:
/usr/local/rvm/log/1385828966_ruby-2.0.0[-p353]/update_system.log
but I don't know where to find it. I must have accidentally set up rvm with multiuser instead of single user but I can't be sure because I used to tutorial to set is up.
Does anyone have any ideas?
Thanks in advance.
In ruby-2.0.0[-p353] the brackets [] mean optional so you can either write:
rvm install ruby-2.0.0
OR:
rvm install ruby-2.0.0-p353
Related
I'm trying to install any Ruby version manager, and then install Rubocop. "brew doctor" says my system is fine, and I recently upgraded laptops from MacOS High Sierra to Big Sur. (I'm on a new computer!)
I seem to have RVM installed correctly, and I have even tried and failed to get rbenv working. RVM is recommended by my software course for it's ease of use, and I'm following their notes, but here is my CLI code:
$ rvm --default use ruby-3.0.2_1
Required ruby-3.0.2_1 is not installed.
To install do: 'rvm install "ruby-3.0.2_1"'
$ rvm install "ruby-3.0.2_1"
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.6/arm64/ruby-3.0.2_1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
mkdir: /usr/local/rvm/log/1637203871_ruby-3.0.2_1: Permission denied
tee: /usr/local/rvm/log/1637203871_ruby-3.0.2_1/update_system.log: No such file or directory
Updating system - please wait
Error running 'requirements_osx_brew_update_system ruby-3.0.2_1',
please read /usr/local/rvm/log/1637203871_ruby-3.0.2_1/update_system.log
Requirements installation failed with status: 1.
There's an old question and answer here that says the top part of my code isn't actually an error message, but I think the bottom part of it is saying I have some kind of issue.
Do I need to grant myself more permissions on this new laptop? Is the hint in the mkdir line above? Something else? How do I fix it? I would like to use an rvm to continue to use VS Code. I could switch to using AWS Cloud 9, but I prefer not to do that.
I was trying to install Sinatra and I kept on getting this error: You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory
Thanks to "Installing gem or updating RubyGems fails with permissions error" I installed rbenv. I followed the guide and set my global ruby version, etc. but I continue to get the same error when I try to install gems. When I run gem environment the installation directory for RubyGems is still the system Ruby directory.
Should I update GEM_PATH? Since the rbenv guide doesn't mention anything about that, something makes me think that there is still a problem with my rbenv installation.
Can someone please help me figure this out?
You're not showing us the commands you're using but it smells like you're using sudo to install Sinatra. Don't do that with rbenv or RVM managed Rubies.
Just as in the linked question, using rbenv or RVM allows you have one or more Rubies in your user-space where you can modify them all you want. That means you don't need to use sudo, just use gem install ....
An alternate problem you could be having is you set your global Ruby to be system, which is the version installed by Apple for their use, and which you don't want to modify unless you understand why it's there and what they're using it for. IF you have to change it then sudo would be appropriate but, with rbenv or RVM managing Rubies in your user-space there's really no reason to.
Do NOT use chmod to change the ownership of the vendor installed gems; Again, that's for Apple's use so have fun with the local Rubies instead and leave Apple's alone.
In this case, I quit Terminal and upon reopening, things were working correctly. Probably a good thing to try if you're stuck and are sure you've followed instructions correctly. It's not explicitly mentioned in the material I read but I believe is a good practice in general.
I'm coming from Windows to Linux (Ubuntu) so I'm new to the CLI. I had issues trying to install Rails so I figured a fresh install would help. I'm following "Installing Ruby the Correct Way."
I thought I had uninstalled Ruby, but after installing 2.1.4 it still shows some Ruby folders. Have I completely uninstalled Ruby?
Downloading ruby-2.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/bf9952cdeb3a0c6a5a27745c9b4c0e5e264e92b669b2b08efb363f5156549204
Installing ruby-2.1.4...
Installed ruby-2.1.4 to /home/richard/.rbenv/versions/2.1.4
richard#richard-ThinkPad-T400:~$ rbenv global 2.1.4
richard#richard-ThinkPad-T400:~$ ruby -v
The program 'ruby' can be found in the following packages:
* ruby
* ruby1.8
Try: sudo apt-get install <selected package>
richard#richard-ThinkPad-T400:~$ sudo rbenv global 2.1.4
richard#richard-ThinkPad-T400:~$ ruby -v
The program 'ruby' can be found in the following packages:
* ruby
* ruby1.8
Try: sudo apt-get install <selected package>
Are the "the following packages" on my local system? or are they online?
EDIT
I've been getting this error when I try to install RVM (and some other applications):
GPG signature verification failed for '/home/richard/.rvm/archives/rvm-1.26.0.tgz' - 'https://github.com/wayneeseguin/rvm/releases/download/1.26.0/1.26.0.tar.gz.asc'!
try downloading the signatures:
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
they can be compared with:
https://rvm.io/mpapis.asc
https://keybase.io/mpapis
Does this have anything to do with it? I wouldn't really think so but I'm a noob.
Don't sudo rbenv anything or you will summon Cthulhu. Use rbenv by itself.
Also, don't randomly follow guides on the internet until you're more familiar with your OS; They go stale, or start out wrong, or don't accurately apply to what you're doing. Instead, go to the source and follow the directions there.
To find out what is installed on your machine, use locate to quickly find Ruby instances. Something like:
locate /bin/ruby | grep -v .rbenv
should narrow down whether multiple Rubies are installed outside the ~/.rbenv directory.
Traditionally, you'll find a normally installed system-wide Ruby in /usr/bin/ruby. A user installed one from source will probably be in /usr/local/bin/ruby unless you specifically said otherwise, probably with a PREFIX= directive.
rbenv will default to installing Ruby in the ~/.rbenv hierarchy since it acts like a sandbox manager and will put all Rubies it installs underneath that directory. RVM, a similar application, will use ~/.rvm, and in both cases, the purpose is to keep them where the user's permissions are sufficient to install and update gems without requiring the use of sudo. For general use, avoid sudo unless you understand what you're about to do, as it can turn a computer into an under-desk heater in seconds.
The shell uses the PATH variable to figure out where to look for executable commands. It sounds like your PATH isn't set correctly. If you followed the directions on the rbenv site, they say how to enable rbenv by modifying your ~/.bash_profile script. Doing that, then closing and reopening your shell should bring rbenv to life.
Following that blog post, you are installing Ruby using a tool called rbenv, and if you only uninstalled one Ruby, that doesn't mean that all Rubies are uninstalled.
The message that you posted shows that it is a local install: Installed ruby-2.1.4 to /home/richard/.rbenv/versions/2.1.4 which is a copy of the 4th line of your message.
You can find out from whence your Ruby executable is being invoked by issuing at the command line:
which ruby
You will then know if the program is available and which it is. Using ruby -v if it is there will tell you the version.
You have done some of these steps and are finding out that your system does not know how to get to the Ruby, if it is indeed installed.
Right now, it is effectively uninstalled, as it is unavailable to your environment.
I can't believe the this isn't a more frequently asked question.
I want to install ruby 1.9.2, and I want it as part of my RVM installation. The link for 1.9.2 has since 404'd on the ruby-lang site, so I copied the tar.gz from the ruby github page, rezipped it into a tar.bz2 like rvm requires and dropped it into ~/.rvm/archives
However, every time I call rvm install 1.9.2-p320 it deletes the source tar.bz2 from ~/.rvm/archives and tries to redownload the tar.bz2 from the ruby-lang site.
The --force and --disable-binary options do nothing to prevent the deleting and redownloading attempts.
Is there a way to point rvm explicitly to the source tar.bz2? I'd like to avoid compiling from source myself and then copying the directory into wherever rvm needs it.
Note: It looks like the ruby-lang ftp server is just down for the moment which explains why the download keeps failing, but my question still stands as this seems like good functionality for rvm to have.
The deletion of archive is controlled with --verify-downloads flag:
rvm install 1.9.2-p320 --verify-downloads 2 --disable-binary
Values for the --verify-downloads flag:
0 - has to have checksum and must validate
1 - does not have to have checksum, if available must validate
2 - continue even the checksum does not validate
The front page of ruby-lang.org does mention that some services would be down, I'd suggest waiting for them to get their services back up and trying again.
http://www.ruby-lang.org/en/news/2013/08/06/status-issue/
rvm usage clearly said
rvm [Flags] [Options] Action
The correct syntax for your problem is
rvm --verify-downloads 2 --disable-binary install 1.9.2-p320
rvm will check the flags and options first before executing any action
I'm currently attempting to install JRuby via RVM on Mac OS X Mountain Lion. However, during the process of installation, the process seems to suddenly stop without an error. I wasn't sure whether or not the install was done, so I tried to use the jruby command. I received an error stating that there was no such command available. I've also tried to re-install JRuby a few times, as well.
The output from RVM looks as follows (this is a re-install):
MacBook-Pro:~ USER$ rvm reinstall jruby
/Users/USER/.rvm/src/jruby-1.7.2 has already been removed.
Removing /Users/USER/.rvm/rubies/jruby-1.7.2...
http://jruby.org.s3.amazonaws.com/downloads/1.7.2/jruby-bin-1.7.2.tar.gz - #configure
jruby-1.7.2 - #download
jruby-1.7.2 - #extract
jruby-1.7.2 - #validate
jruby-1.7.2 - #setup
Saving wrappers to '/Users/USER/.rvm/bin'.
jruby-1.7.2 - #importing default gemsets (/Users/USER/.rvm/gemsets/), this may take time ...
Making gemset jruby-1.7.2 pristine.
Making gemset jruby-1.7.2#global pristine.
At this point, the installation seems to suddenly end, and I'm back to MacBook-Pro:~ USER$.
Any ideas? Thanks a bunch!
this is proper flow, everything worked as expected, it did not stopped half way - it finished successfully.