ERROR: Error installing friendly_id: activesupport requires Ruby version >= 1.9.3. with Rails2.3.3 and Ruby 1.8.7

StackOverflow https://stackoverflow.com/questions/19025601

Question

When I try to install friendly_id :version => "~> 3.0.6" with rails 2.3.3 wtih ruby 1.8.7 getting error for Ruby version

ERROR: Error installing friendly_id: activesupport requires Ruby version >= 1.9.3.

Current version of Rails is 2.3.3 and Ruby is 1.8.7

I have goggled but couldn't find any solution, Please help me for resolving it.

my gems are:

and gem list

* LOCAL GEMS *

actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (2.3.18, 2.3.3)
atomic (1.1.14)
authlogic (2.1.9)
bundler (1.3.5)
bundler-unload (1.0.1)
crummy (1.7.2)
currencies (0.4.2)
declarative_authorization (0.5.7)
exceptional (2.0.6)
geoip (1.3.0)
geokit (1.6.7)
geonames (0.3.3)
god (0.13.3)
i18n (0.6.5)
json (1.8.0)
minitest (4.7.5)
multi_json (1.8.0)
rack (1.0.1)
rails (2.3.3)
rake (10.1.0)
rdoc (4.0.1)
rdoc-data (4.0.1)
rubygems-bundler (1.2.2)
rubygems-update (1.4.2)
rvm (1.11.3.8)
SystemTimer (1.1.3)
thread_safe (0.1.3)
tzinfo (1.1.0, 0.3.37)
validates_timeliness (2.3.2)

Please help me how to install friendly_id with rails2.3.3 and Ruby 1.8.7

Was it helpful?

Solution

I think you need to check exactly what friendly_id version you are attempting to install outside of Gemfile specifications.

According to friendly_id documentation here:

For (Active Record) 2.3 support, you can use FriendlyId 3.x, which will continue to be maintained until people don't want it any more.

So, 3.0.6 should work for you, if that is what you are installing. Use "gem list friendly_id" to see what you have locally, which should be nothing. Use "gem list friendly_id -r" to see what is available remotely. It will try to install the highest level available by default. What I got was friendly_id (4.0.10.1).

Do you have 3.0.6 downloaded to your system? If you do, are you using gem build/gem install to build and install it? At what point do you get the error message? The gem install will install the locally built version by default if you are in its directory...

If all of this still fails, post the Gemspec file from it so that we can review the requirements. You may need to update these before the build/install. However, YMMV and you must test it fully before you can trust it if you change Gemspec.

However, let me reiterate the recommendation to upgrade to current supported software, especially if you are making extensive changes. As you indicated, you may face having to upgrade both your local code and the installed gems. That is the price you pay for support and advanced features.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top