After a system upgrade to macOS 10.14 I am suddenly unable to install Rails 3.2.5 on Ruby 1.8.7, since a new gem is required now: Concurrent-ruby.
I was able to install and use this system on macOS 10.13. Why is concurrent-ruby suddenly a requirement? How can I find a way to get on without it?
I found a solution.
I used to install some gems before installing Rails 3.
These were:
rdoc-data -v 3.12
i18n -v 0.6.11
execjs -v 1.4.0
rack-cache -v 1.2
rails -v 3.2.5
I found out that I had to install
rack -v 1.4.7
before installing
rack-cache -v 1.2
Now I am again able to install Rails 3.
Somehow the install process must have loaded the requirements for a newer version of i18n, since later versions of this gem require concurrent-ruby.
Rails 3.2.5 on Ruby 1.8.7? Do you need that old versions?
Related
After over a year of not touching a Rails app, I updated all gems and tried to deploy again.
I get this error:
Installing sassc 2.0.1 with native extensions
Gem::InstallError: sassc requires Ruby version >= 2.3.3.
Using rb-inotify 0.10.0
Using mime-types 3.2.2
Using coffee-script 2.4.1
Using compass-core 1.0.3
Using compass-import-once 1.0.5
Using sdoc 1.0.0
Using slim 4.0.1
Using validates_timeliness 4.1.1
Using validates_email_format_of 1.6.3
Using activesupport 5.2.3
Using loofah 2.2.3
Using axlsx 2.1.0.pre from https://github.com/randym/axlsx.git (at c8ac844#c8ac844)
Installing mobility 0.8.7
Gem::InstallError: mobility requires Ruby version >= 2.3.7.
Using css_parser 1.7.0
An error occurred while installing sassc (2.0.1), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.0.1'` succeeds before bundling.
! ERROR: Deploy failed.
-----> Cleaning up build
Unlinking current
OK
Connection to XXX closed.
! Run Error
So the Ruby version used by Mina is too old (< 2.3.7).
Interestingly, when I log into the server, I see that RVM has installed Ruby 2.4.1:
$ rvm list
rvm rubies
ruby-2.2.5 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]
=* ruby-2.4.1 [ x86_64 ]
After taking a closer look at Mina's output, I see:
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
I wonder which Ruby version Mina is using? And how can I tell it to use the same version that the Rails-app uses on the server?
I'm in contact with the server support, and they are asking:
How does mina concretely work? Is this done locally or remotely on our system?
I don't know what to answer, I'm a "simple" Rails programmer with not much experience in deploying apps. It used to work perfectly a year ago, now it doesn't do anymore.
Thanks for any help.
I'm using Ruby 1.9.3 with my Rails v3.2.19 application and I'm unable to run bundle because Nokogiri requires a Ruby version >= 2.1.0. At the moment I cannot upgrade my Ruby version and I really need to install Nokogiri otherwise my app won't run.
Besides the regular solutions using gem install, I've already tried the following command line with no success:
gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/usr/include/libxml2
ERROR:
>Error installing nokogiri:
nokogiri requires Ruby version >= 2.1.0.
Is there a way that I can install Nokogiri using my current Ruby version?
Additional Info:
Rails version - 3.2.19
Ruby version - 1.9.3
Nokogiri version - 1.7.0.1
OS - CentOS 7
The last version of nokogiri to support Ruby 1.9.3 was 1.6.8.1, so you need to do something like
gem install nokogiri -v 1.6.8.1
First try update xcode command line tools xcode-select --install
Then try these steps https://github.com/sparklemotion/nokogiri/wiki/What-to-do-if-libxml2-is-being-a-jerk
I'm getting the following error:
ERROR: Error installing rails:
mime-types-data requires Ruby version >= 2.0.
This happens while installing Rails on Ubuntu using the command:
sudo gem install rails
How can I fix this?
As the error suggests, you need Ruby version 2.0 or later.
You are probably using system ruby. Not sure about Ubuntu 16, but earlier versions used to come with Ruby v1.9.3. You can check your current Ruby version by running the following code in your terminal:
ruby -v
For easier rubies version management, I would highly suggest to use one of the popular ruby version managers:
RVM
rbenv
Install rvm and then install latest stable version.
# Using rvm
rvm install 2.3
# Using rbenv
rbenv install 2.3
The current ruby version in your system is below 2.0.
Try installing ruby 2.0 or higher versions before installing rails.
That will solve the problem.
I was facing the same problem trying to install rails with sudo.
I was getting: ERROR: Error installing mime-types-data: mime-types-data requires Ruby version >= 2.0
The thing is ruby -v gives me ruby 2.2.3p173 while sudo ruby -v gives me ruby 1.9.3p484.
So instead of sudo gem install rails I just did gem install rails and it worked.
Error: mime-types-data requires Ruby version >= 2.0
Notice: You shouldn't install rails with sudo permission.
I'm new to Rails, following Michael Hartl's textbook. When I run $ bundle install I get the following error:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.7.6)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
I then try $ gem install bundler which works fine:
Successfully installed bundler-1.7.6
Parsing documentation for bundler-1.7.6
1 gem installed
However, this doesn't solve the problem. I'm sensing this has something to do with version problems, but I'm not sure where to go with it...
The following :
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
means the version of bundler required is greater than or equal to 1.0.0 but strictly less than 1.1.0. Rails 3 is depending on an old version of bundler. At this point of time, you should try out Rails 4 instead :)
You may read up more about the "version syntax" in http://guides.rubygems.org/patterns/#pessimistic_version_constraint
As #user3927334 has already stated the error you got is due to a version conflict between bundler and rails.
Most likely you have run rails new my_app with an outdated version of the rails gem.
gem install rails -v 4.2.0.beta4
Can be used to install a particular version of Rails. see Installing Rails.
You should then remove your old app and rerun the app generator:
rails _4.2.0.beta4_ new hello_app
If you indent to develop on your local machine I would recommend installing RVM (Ruby Version Manager) (as did previous versions of MH's Ruby on Rails Tutorial.)
It allows you to effortlessly switch between different versions of ruby and different sets of gems.
so I run:
$ gem install rails --version 3.0.1
Successfully installed rails-3.0.1
1 gem installed
Installing ri documentation for rails-3.0.1...
Installing RDoc documentation for rails-3.0.1...
then I get the error:
$ rails -v
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate rails-3.0.1, because bundler-1.1.4 conflicts with bundler (~> 1.0.0) (Gem::LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `activate'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
from /usr/local/rvm/gems/ruby-1.9.3-p125#rails3tutorial/bin/rails:18:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p125#rails3tutorial/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p125#rails3tutorial/bin/ruby_noexec_wrapper:14:in `<main>'
So Rails 3.0.1 requires Bundler v1.0.0 - v1.0.22 (actually any 1.0.x version up to, but not including, 1.1.0), but you have a newer version of Bundler that's being loaded when Rails is started. You could uninstall the newer version(s) of Bundler (though this is a crappy way to deal with the issue) or since you're using RVM, just create a gemset for Rails 3.0.1.
$ rvm gemset create rails_3.0.1
$ rvm gemset use rails_3.0.1
$ gem install rails -v 3.0.1
$ rails -v
3.0.1
Note: this requires that Bundler not be in your global gemset for the Ruby version you're trying to use. If the global gemset contains a Bundler version equal to or higher than 1.1.0 then you'll get the same error as before.
Update: A little explanation about ~> and RubyGems versioning might be handy. The section on pessimistic version constraint in the RubyGems docs does a fantastic job of covering everything.
You may need to update to bundler 1.1.4.
gem update bundler
should do the trick.
This is possibly due to Ruby v1.9.2/3 uses bundler v1.1.4 while Rails v3.0.1 requires bundler v~1.0.0. Hence, by simply updating the Rails version to v3.2.6, the conflict is solved. This conflict can be easily solved by matching the Ruby and Rails version.
I had same problem with mysql. I uninstalled mysql gem and I installed the newest version of mysql gem. Is RVM ok?