I don't know what's going on with my installation of ruby / rails under OSX Mountain Lion.
I start with a black rails application, run bundle and listing the installed bundles with bundle show I get this:
[..]
* sqlite3 (1.3.7)
* thor (0.17.0)
* tilt (1.3.3)
* treetop (1.4.12)
[..]
As soon as I run rake db:migrate I get the following error:
Could not find thor-0.17.0 in any of the sources
Run `bundle install` to install missing gems.
But, as shown, thor-0.17 is installed. If I force it:
sudo gem install --version 0.17 thor
Successfully installed thor-0.17.0
1 gem installed
Installing ri documentation for thor-0.17.0...
Installing RDoc documentation for thor-0.17.0...
And run the migration again, I keep having dependency errors (in this case "Could not find formtastic-2.2.1 in any of the sources") for gems that bundle says are already installed. Any help? Thanks
EDIT
Gemfile: http://pastebin.com/WSz5dLrm
Gemfile.lock: http://pastebin.com/2kuFz1kK
So after using your Gemfile I got the following error :
Bundler could not find compatible versions for gem "railties": In
Gemfile:
rails (= 3.2.8) ruby depends on
railties (= 3.2.8) ruby
sass-rails (~> 3.2.3) ruby depends on
railties (3.2.11)
Bundler could not find compatible versions for gem "actionpack": In
snapshot (Gemfile.lock):
actionpack (3.2.11)
In Gemfile:
meta_search (>= 1.1.0.pre) ruby depends on
actionpack (~> 3.1.0.alpha) ruby
Running bundle update will rebuild your snapshot from scratch, using
only the gems in your Gemfile, which may resolve the conflict.
Using rails with the version 3.2.11 fixed the bundle.
Rails 3.2.11 fixes a huge security threat anyway, so update !
Related
I'm trying to upgrade an old project into new versions of ruby and rails.
ruby 2.5.1 -> ruby 3.1.2
rails 5.2.8.1 -> rails 6.0.3
This is the error im getting:
$ bundle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies.....
Bundler could not find compatible versions for gem "actionpack":
In snapshot (Gemfile.lock):
actionpack (= 5.2.8.1)
In Gemfile:
rails (~> 6.0.3) was resolved to 6.0.3, which depends on
actionpack (= 6.0.3)
devise_token_auth (= 1.0.0) was resolved to 1.0.0, which depends on
devise (> 3.5.2, < 4.6) was resolved to 4.5.0, which depends on
railties (>= 4.1.0, < 6.0) was resolved to 5.2.8.1, which depends on
actionpack (= 5.2.8.1)
Deleting your Gemfile.lock file and running `bundle install` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
$ rails s
Could not find gem 'rails (~> 6.0.3)' in locally installed gems.
The source contains the following gems matching 'rails':
* rails-5.2.8.1
Run `bundle install` to install missing gems.
I was hoping to update my old rails project into newer versions of ruby and rails including working dependencies.
The Devise gem didn't support Ruby on Rails 6.0 until version 4.7. That means when you want to update Rails to 6.0 then you need to update Devise at the same time.
I would try running:
bundle update rails device devise_token_auth
Btw. Rubygems is a great resource to investigate version dependencies. Here, for example, you can see that Devise 4.6.2 only support railties < 6.0 but Devise 4.7.0 had that limitation removed.
I am getting the following error when I run 'bundle install':
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
google-drive (>= 0) ruby depends on
middleman-core (>= 3.2.2) ruby depends on
activesupport (~> 3.2.6) ruby
rails (= 4.2.0) ruby depends on
activesupport (4.2.0)
I don't specify a version for the google-drive gemfile, but I do specify gem 'rails', '4.2.0'.
If I fail to specify a rails version, I get a really old version.
Try to update google-drive. Run bundle update google-drive.
Well - it looks like I was using the wrong gem. It's google_drive not google-drive.
I'm currently running Ruby 1.9.3 and Rails 4.1.1
Getting this message when using bundle install:
In Gemfile:
coffee-rails (= 4.0.1) ruby depends on
railties (< 5.0, >= 4.0.0) ruby
rails (= 3.2.16) ruby depends on
railties (3.2.16)
I tried gem install railties and still got the same thing.
I'm sure there's an easy fix that isn't so obvious for a beginner like me. What's wrong here?
Delete Your gemfile.lock , & again do bundle install , i think rails 4.1.1 not properly install. do
gem install rails -v 4.1.1
Project rails 2.3.14
gem 'google-adwords-api', '0.7.2'
bundle install
The error:
Bundler could not find compatible versions for gem
"rack": In Gemfile:
google-adwords-api (= 0.7.2) ruby depends on
rack (~> 1.4) ruby
rails (= 2.3.14) ruby depends on
rack (1.1.0)
Is it possible to fix this issue without using newer version of Rails?
try this..
bundle exec bundle install
You could try it without a specific version, to see if there are any compatable versions, like this gem 'google-adwords-api' instead of gem 'google-adwords-api', '0.7.2'.
when pushing to Heroku I get the following bundler error
Fetching gem metadata from https://rubygems.org/.........
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 3.2.1) ruby depends on
railties (= 3.2.1) ruby
jquery-rails (= 2.0.0) ruby depends on
railties (3.2.6)
I was having the same problem, so I looked up the jquery-rails gem and saw that it has been updated to version 2.0.2. I updated my Gemfile to that version and ran bundle install again and everything worked. Commit your Gemfile of course, so that the update gets pushed to Heroku as well.