I've got a project that uses Rails 4.2.4, Mongoid 4 and I'd like to upgrade to Rails 5.1.0.rc1 and Mongoid 6.1.0.
I've followed the instructions [here] (http://railsapps.github.io/updating-rails.html) however when I run the command bundle update I get the following error:
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rails (= 5.1.0.rc1) was resolved to 5.1.0.rc1, which depends on
actionpack (= 5.1.0.rc1) was resolved to 5.1.0.rc1, which depends on
rack (~> 2.0)
sinatra (>= 1.3.0) was resolved to 1.3.0, which depends on
rack (~> 1.3)
Any ideas of why?
I'm attempting to add an on boarding tutorial to my site. I've installed the joyride-rails gem and am getting this error when running bundle install.
Bundler could not find compatible versions for gem "rails":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
rails (~> 3.1) ruby
rails (4.1.6)
I've done some research and found this answer Dependency error while installing the gem "joyride-rails"
And this answer Simple Javascript Joyride plugin in rails
The problem is I think that the joyride gem just isn't compatible with rails 4 and when I down grade to 3.1 a bunch of my other gems are in conflict. I delte the gemfile.lock and run bundle install and get this error.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (~> 4.0.0) ruby depends on
railties (< 5.0, >= 4.0.0.beta) ruby
rails (= 3.1) ruby depends on
railties (3.1.0)
Any suggestions as to how I can implement this gem? Or do you know of another Gem that will accomplish the same goal?
Thanks!
When trying to install the Mechanize gem, I get the following error:
Resolving dependencies...
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 4.0.2) ruby depends on
mime-types (~> 1.16) ruby
mechanize (~> 2.7.3) ruby depends on
mime-types (2.0)
Now I understand that it's because rails depends on mime-types ~1.16 and Mechanize mime-types 2.0 but is there no way to get those two to play nicely together?
Specify mechanize ~> 2.6.0 for now and you should be okay until the Rails team can update their gem requirements for mime-types.
Check https://github.com/sparklemotion/mechanize/blob/master/CHANGELOG.rdoc to see if any of the revisions after 2.6.0 fix bugs or add features that may be important to you.
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
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.
I previously never had a problem with Refinery. I was refreshing my knowledge by following along to the tutorial http://railscasts.com/episodes/332-refinery-cms-basics .Then when I created a new app with Refinery CMS, I got this error
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
refinerycms (~> 2.1.0) ruby depends on
actionmailer (< 3.3, >= 3.1.3) ruby
rails (= 4.0.0) ruby depends on
actionmailer (4.0.0)
But should not these things be there by default with the CMS? why would there be errors only now?
The latest code supports Rails 4; the gem must be sourced from the master branch, until a release is made.
Git Issue #2428 - Rails 4 support
Add to your Gemfile:
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'refinerycms', github: 'refinery/refinerycms', branch: "master"
# Strong parameters is a new feature not used by Refinery
gem 'protected_attributes'
Do a:
$ bundle install
Create a new Refinery app, the command will be different depending on what you want to do. For that there are a few guides that you can follow. In my case, I added it to an existing app with:
$ rails generate refinery:cms --fresh-installation
Start your server and go to: http://localhost:3000/refinery
Well, my five cents are that Refinery is not yet available for Rails 4:
Is there any cms for Rails 4?
http://refinerycms.com/
http://refinerycms.com/blog/refinery-cms-210-released
Best,
Ben.
Simply initialize the application using:
rails new my_new_application -m http://refinerycms.com/t/edge
Behind the scenes:
This command makes your application use the master branch of refinery, which supports Rails 4.
Update
Although the above is the easiest and official way, it didn't totally work for me. I had to manually run the following command after the above one:
rails generate refinery:cms --fresh-installation
Looks like the rails4 branch has been getting a bit of love over the past few days:
https://github.com/refinery/refinerycms/tree/rails4
I will try it out and update with how I get on.
OK, let's try and answer this one. This is the route I went down.
First, I installed the refinerycms gem.
gem install refinerycms
I then did a:
rbenv rehash
Then I followed the guide:
refinerycms rickrockstar
Bundler complained:
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms-wymeditor (>= 1.0.6, ~> 1.0) ruby depends on
refinerycms-core (>= 3.0.0, ~> 3.0) ruby
refinerycms-acts-as-indexed (>= 1.0.0, ~> 1.0) ruby depends on
refinerycms-core (~> 2.1.0) ruby
In my gemfile, I changed the following lines:
gem 'rails', '4.2.4'
gem 'refinerycms'
gem 'refinerycms-acts-as-indexed'
gem 'refinerycms-wymeditor'
And this solved the issue.
I had to then do a:
bundle install
Then a:
rails generate refinery:cms --fresh-installation
I posted an issue on github and got the following answer from the RefineryTeam:
It looks like the culprit was refinerycms-acts-as-indexed version - it should be ~> 2.0.1 to work with Refinery 3.0.0
https://github.com/refinery/refinerycms/issues/3072
Please also see this page where things might be running more smoothly than following the guide on Refinery's website. What is to be seen there is similar to Zuhaib Ali's answer above (in a bit more details).
Hope this helps