So I'm trying to generate a token for my Rails 7 app with devise_token_auth and I found this gem but I get this error and I understand that the gem is no longer updated:
Fetchings gem metadata from https://rubygems.org/...........
Resolving dependencies....
Bundler could not finde compatible versions from gem "rails":
In Gemfile:
rails (~> 7.0.1)
devise_token_auth was resolved to 0.1.21.alpha2, which depends on
rails (~> 4.1.4)
So what can I do about it?
Are there more gems like devise_token_auth? I can fix it without chainging my Rails version?
Thanks!
The latest version of devise_token_auth on rubygems (1.2.0) doesn't support rails 7, but the latest code on GitHub does support rails 7.
Try adding the gem like this
gem 'devise_token_auth', '>= 1.2.0', git: "https://github.com/lynndylanhurley/devise_token_auth"
Related
I am new to rails and building my first web application using version 4.2.4.
I am trying to install the activeadmin gem using
gem 'activeadmin', '~> 0.6.6'
However, when I run bundle install I get an error which says:
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 4.2.4)
In Gemfile:
activeadmin (~> 0.6.6) ruby depends on
rails (< 4, >= 3.0.0) ruby
rails (= 4.2.4) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Is this suggesting that I need to go down a version of rails in order to make this gem work or can I keep 4.2.4 and use the suggested bundle update method without causing any issues with my app and other gems?
The version of activeadmin that your Gemfile specifies does not support Rails 4. From the readme:
We're currently working on 1.0.0, which as far as dependencies, moves
us from meta_search to Ransack and adds Rails 4 & 5 support.
You can get it by tracking master:
gem 'activeadmin', github: 'activeadmin'
Or you can using rubygems:
gem 'activeadmin', '~> 1.0.0.pre2'
Change your Gemfile as shown, and then run bundle install
Just installed via RVM Ruby 2.0.0 and Rails 4.0.0. Started a new project and when tried to add the gem 'factory-girl-rails', and run bundle install, I got this error:
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'factory-girl-rails (~> 4.2.1) ruby' in the gems available on this machine.
Any thoughts why can this be happening?
You need to change those dashes to underscores:
gem 'factory_girl_rails', '4.2.1'
factory_girl_rails does not seems to be available for rails higher then version 3.2.11
https://github.com/thoughtbot/factory_girl_rails#rails
I'm trying to install a gem, I updated it in the gemfile, then bundle install.
I received the following error message:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
merchant_samples (>= 0) ruby depends on
rails (~> 3.2.9) ruby
rails (3.2.7)
What does it mean? What can I do? I'm using rvm, do I need to switch to another version of ruby? of rails? and if so, which one and how? and why :)
What that means is that merchant_samples gem requires rails 3.2.9 or higher and you are using version 3.2.7. So to use it you need to upgrade your rails version to 3.2.9 at least, but you should actually update to the latest 3.2.* since there are some security issues on older versions. At the moment the newest version is 3.2.13
You can upgrade changing your Gemfile to:
gem 'rails', '3.2.13'
Then you must run bundle and everything should be working.
Its important to update rails after all of the security fixes, but when I try it says the gem does not exist even though the rails blog says it has been released.
The blog says to upgrade: http://weblog.rubyonrails.org/2013/1/28/Rails-3-0-20-and-2-3-16-have-been-released/
But when I add the following to the Gemfile:
gem 'rails', '3.2.16'
And when I update I get:
➜ bundle update rails (ruby-1.9.3-p374#usertesting-orders)
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Could not find gem 'rails (= 3.2.16) ruby' in the gems available on this machine.
Any tips?
UPDATE: there is no such gem. Its supposed to be 3.2.11 NOT 3.2.16. The .16 is for the 2.3 Rails and not the 3.2.
Try gem 'rails', '3.2.11' ,according to the stable branch in GitHub.
While trying to install Rails admin, I added it to my gem file as instructed. I deleted the gemfile.lock
Then I ran bundle install. I got this message:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails_admin depends on
rails (~> 3.0.3)
rails (3.0.1)
I am using rails 3.0.1, not really sure I understand the issue? But its obviously stopping me from installing.
Also, if I put rails_admin in the gem file like so:
gem 'rails_admin'
instead of:
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
that seems to install it a version 0.0.0 and then doesn't proceed to do anything (so clearly thats not right either).
Is there a version I can specify that might work?
Thanks!
The issue is that the gem now required rails 3.0.3 and you are using 3.0.1
~> means at least this tiny revision or greater.
E.G. ~> 3.0.3 means 3.0.x where x >= 3
As for what gem version will work on 3.0.1 I do not know.