I am using rails on my local host and have recently been confronted with the following message.
Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
Sounds fair enough, however when I run the suggested command, it hangs on installing the cairo gem with the following message.
Cached gem for cairo-1.12.8 not found, attempting to fetch...
ERROR: While executing gem ... (Gem::Exception)
Cannot load gem at [/usr/share/rubygems-integration/1.9.1/cache/cairo-1.12.8.gem] in /home/me/
What might be going on here?
You need to update your rubygems to the 2.1.0 or newer versions. The newest version is currently 2.4.5 it was updated Dec. 3rd 2014. Try this link to update. https://rubygems.org/gems/rubygems-update
Hi all I ended up finding a post that recommended I just reinstall ruby again. Seeing no other choice I did a rvm uninstall ruby then a rvm install ruby and set everything else back up and it went well. Unsatisfying but true :-P
Related
I am trying to install rails after having installed ruby 2.4.1p111 on windows 8.1 from 'Start Command Prompt with Ruby(this is just like command prompt that got installed with ruby)'.
I use the command gem install rails and after a few seconds of pause the Title of the question is thrown as error.
I tried the command gem install nokogiri -v 1.7.1 and it throws the same error.
If I run gem list, it does not list nokogiri at all.
A possible solution I came across read. Change nokogiri version in gem Gemfile with some command gem 'nokogiri', '~> 1.6.8'. I don't know if that even applies to the version of rails I have installed. If this is the solution, how do I implement it?
How do I rectify this error and install rails?
Apparently there is an issue1 in Nokogiri compatibility with Ruby 2.4+, you can check the report here; it will be fixed in Nokogiri 1.8.0.
In the meantime, you could use Ruby 2.3.4, until version 1.8.0 is released.
I don't know if that even applies to the version of rails I have
installed.
No, it don't since you will be downgrading Nokogiri version and will not solve the compatibility issue. That worked for users whose Ruby version was prior to 2.1.0
1 Please notice (as pointed out in the comments) that this a Windows-only issue.
Edit:
You can update now your gemfile:
gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.8" : "~> 1.6.8")
I am running brakeman outside of my Gemfile, so am not using bundler.
If I do gem list, I can see I have the following for brakeman
brakeman (3.3.3, 3.3.2, 3.1.4, 3.1.2)
But if I do brakeman --version, I get
brakeman 3.1.2
so I am not using the latest version. If I do gem update brakeman or
gem update brakeman, '3.3.3,
I get
Updating installed gems
Nothing to update
So how do I run brakeman version 3.3.3?
If you have several gem versions installed and you want to invoke a specific version from the command-line, you could use:
brakeman _3.3.3_ [args go here]
This is not specific to brakeman, you can do this for most other gems as well.
I can't reproduce this issue, but I can think of a few reasons why this might happen:
Bundler artifacts (perhaps in .bundle/) pointing to the old version. Try running in a different directory and see if it still happens
A bug in RubyGems (try gem update --system)
During install, it asked if you wanted to replace the brakeman binary and you selected "no"
If you are using a Ruby version manager, maybe one version is on a different path than another (like a system gem versus one managed by rvm)
Any number of GEM_PATH, bundler, gem, rvm weirdness that sometimes occurs
In any case, if I were you I'd gem uninstall brakeman, remove all versions, and install fresh. If you are using rvm, start with a fresh gemset or rvm gemset empty the current one.
I had a similar problem: I uninstalled a certain gem version, but the version still showed up.
TL;DR: rbenv rehash did the trick. (Only valid for rbenv users, obviously)
This error appears for a new rails app, with nothing modified, when visiting the homepage (after successfully running bundle install).
Here are the version numbers:
ruby: 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
rails: 3.2.12
rvm: 1.18.14
gem: 2.0.0
bundler: 1.3.0.pre.8
Calling which ruby returns /Users/J/.rvm/rubies/ruby-1.9.3-p392/bin/ruby, which seems fishy, right?
You need to update Bundler: gem update bundler
RubyGems release 2.0 seems to be the trigger for the error:
RubyGems 2.0 includes several new features and many breaking changes. Some of these changes will cause existing software to break. . . . If you are using bundler be sure to install a 1.3.0.prerelease version or newer. Older versions of bundler will not work with RubyGems 2.0.
Here are the issue details.
Thanks!
Rails-7, ruby 3.1.2, had the same issue
solved it by gem update --system
Run:
gem update --system 1.8.24
Sounds like there's something buggy with latest.
Have you tried updating your RubyGems?
gem update --system
gem update bundle && gem update --system
For me it was all of the above + using the new one on my nginx config.
I installed rubygems-1.7.2 but then out of some confusion with not being able to install rails when I ran this command:
gem install rails
and I got this error:
ERROR: Error installing rails:
bundler requires RubyGems version >= 1.3.6
That is a bit strange since the rubygems I have on my system is a much later version. Do I maybe need to configure it somehow so that my shell recognizes it? What is a step I might be missing to have this resolved?
I have
/usr/local/rubygems-1.7.2
was it supposed to get installed in a different directory or something?
Installing RVM made it unnecessary to install RubyGems separately...I think :)
When I try to run even simple rails commands such as:
rails -h
I get a popup error after a few seconds that says:
ruby.exe - Unable To Locate Component
This application has failed to start
because msvcrt-ruby18.dll was not
found. Re-installing the application
may fix the problem.
I am running:
Windows XP (yes I know I should attempt ruby on a Windows machine).
Ruby 1.9.1p378 [i386-mingw32].
Have updated all my gems to latest versions (as of 14-July-2010).
Is there a way I can test what is making this error? Does anyone know what it could mean?
I have found that in my ruby19/bin folder there is msvcrt-ruby191.dll but there is no msvcrt-ruby18.dll anywhere. Why would it be looking for this anyway if I'm using ruby 1.9?
The current release version 1.1.5 of Mongrel is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure Rubygems is up-to-date:
gem update --system
Then install the new pre-release version of Mongrel:
gem install mongrel --pre
Alternatively, if this isn't caused by Mongrel, you can try installing the DevKit, then try this:
gem install *gemname* --platform=ruby
This forces compilation of the extension from source using DevKit and works with most of the major gems I've tried.
Ruby 1.9.1 was running well on my Windows XP PC, but I've got this error message after installing mongrel. Unfortunately, mongrel has no update for Ruby 1.9.1 yet. Perhaps, for this reason, it generates this error on my PC.
JRuby might work better for you. Either way, trying to use Ruby on Windows will leave a bad taste in your mouth. Either get a VM with Linux to work with it, or pay $10/mo for a VPS where you can play.
you got the binary version of the gem, which only includes binaries for 1.8
try gem install mongrel --platform=ruby --pre
To solved msvcrt-ruby.dll error
Install DevKit ( https://github.com/oneclick/rubyinstaller/wiki/Development-Kit )
> gem uninstall json
> gem install json