RoR - Bundler could not find compatible versions for gem "rails" - ruby-on-rails

When I ran bundle install this is the output I got:
kevindeMacBook-Pro:happy kevin$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
In Gemfile:
auto-facebook (= 0.4) ruby depends on
rails (= 4.0.0) ruby
rails (4.1.1)
and I saw other similar problems , can use delete Gemfile.lock and bundle install.
but I can't found Gemfile.lock this file
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'devise', '3.0.2'
gem "seo_helper", "~> 1.0.2"
gem "open_graph_helper"
gem "rmagick"
gem "carrierwave"
gem "carrierwave-meta"
gem "settingslogic"
gem "anjlab-bootstrap-rails", "2.3.1.2", :require => "bootstrap-rails"
gem "bootstrap_helper", ">= 4.2.2.1"
gem "simple_form", "~> 3.0.1"
gem "will_paginate", "3.0.3"
gem "font-awesome-rails", "~> 3.2.1.3"
gem "high_voltage"
gem "airbrake"
gem "rvm-capistrano"
gem "omniauth"
gem "omniauth-facebook"
gem "auto-facebook", "0.4"
gem "whenever"
gem "hipchat"
# Cache
gem "dalli"
gem "compass-rails", "~> 1.1.2"
group :development do
gem "capistrano"
gem "capistrano-ext"
gem "cape"
gem "binding_of_caller"
gem "better_errors", "~> 0.9.0"
gem "magic_encoding"
gem "annotate"
gem "powder"
gem "pry-nav"
gem "pry-remote"
end

Change:
gem "auto-facebook", "0.4"
to
gem "auto-facebook", "~> 0.42"
It looks like 0.4 has the rails version fixed at 4.0.0: https://rubygems.org/gems/auto-facebook/versions/0.4

Related

#RubyOnRails Bundler could not find compatible versions for gem "sprockets":

I tried run "bundle update" in one project, but the console gives me the next error:
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
sprockets (= 2.2.2)
rails (= 3.2.8) was resolved to 3.2.8, which depends on
actionpack (= 3.2.8) was resolved to 3.2.8, which depends on
sprockets (~> 2.1.3)
my Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'liquid'
#gem 'RedCloth'
# Gems used only for assets and not required
# in production environments by default.
gem 'tinymce-rails'
gem "rmagick"
gem 'carrierwave'
#gem 'therubyracer'
gem 'devise'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'simple-private-messages', '0.0.0', :git => 'git://github.com/jongilbraith/simple-private-messages.git'
gem 'rb_wunderground'
gem "twitter-bootstrap-rails"
gem 'sprockets', '2.2.2'
gem "jquery-rails"
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
#gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
#gem 'twitter-bootstrap-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'wicked_pdf'
gem 'roadie'
gem 'wkhtmltopdf-binary'
end
#group :development do
# gem 'sunspot_solr'
#end
#gem "progress_bar"
gem "declarative_authorization"
gem 'jquery-rails'
#gem 'tire'
#gem 'rsolr'
#gem 'sunspot_rails'
gem 'pg'
gem 'texticle', require: 'texticle/rails'
gem "recaptcha", :require => "recaptcha/rails"
gem 'kaminari'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
gem 'rvm-capistrano'
# To use debugger
# gem 'debugger'
gem 'rails-i18n'
gem 'kaminari-i18n'
gem 'constantcontact'
group :test, :development do
gem 'table_print'
gem "rspec-rails"
gem 'pry-rails'
gem 'ruby_parser'
gem "declarative_authorization"
end
gem 'paperclip'
gem 'spreadsheet'
gem 'textacular'
Please try to not specify the exact sprockets version. For example :
gem 'sprockets', '~> 2.0'
Try replacing gem 'sprockets', '2.2.2' with gem 'sprockets', '~> 3.7.1'. That's a change to the syntax and the version. You can check the current version of gems at RubyGems.org

uninitialized constant Sprockets::Rails::VERSION (NameError)

In updating dependencies, I have come across updating sprockets. However there doe not appear to be a proper dependency for my set of gems. After returning to: 2.11.3, the erorr apepars:
/Users/..../rvm/gems/ruby-2.3.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>': uninitialized constant Sprockets::Rails::VERSION (NameError)
Gemfile:
source 'http://rubygems.org'
ruby '2.3.0' # '1.9.3'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.2.6'
#gem 'pg', '0.15.1'
gem 'mysql2', '0.4.4'
gem 'bootstrap-sass', '3.3.6'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.1.0'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'geocoder', '1.3.7'
gem 'nested_form', '0.3.2'
gem 'utf8-cleaner', '0.2.4'
gem 'sprockets', '3.6.0' #2.11.3
gem 'json', '1.8.3'
gem 'ffi'
gem 'iconv', '1.0.4'
gem 'chosen-rails', '1.5.2'
gem 'compass-rails', github: 'Compass/compass-rails'
# For image uploads
gem 'carrierwave', '0.11.2'
# For uploading CSV
gem 'roo', '2.4.0'
# DataTables
gem 'jquery-datatables-rails', '3.4.0' # git: 'git://github.com/rweng/jquery-datatables-rails.git'
gem 'jquery-ui-rails', '5.0.5'
# Editing in line:
gem 'best_in_place', '3.1.0'
# Passing data from controller to coffeescript
gem 'gon', '6.0.1'
#gem 'jquery-turbolinks' '2.1.0'
# For searching and webservice queries-NO LONGER USED
#gem 'sunspot_rails', '2.1.0'
#gem 'sunspot_solr', '2.1.0'
gem 'progress_bar', '1.0.5'
gem 'responders', '2.2.0'
# Calendar Date and Validation
gem 'bootstrap-datepicker-rails'
# For Google Maps overlays
gem 'gmaps4rails', '~> 2.1.2'
gem 'underscore-rails', '~> 1.8.3'
group :development, :test do
gem 'rspec-rails', '3.4.2'
gem 'guard-rspec', '4.7.2'
gem 'spork-rails', '4.0.0'
gem 'childprocess', '0.5.9'
gem 'guard-spork', '2.1.0'
end
group :test do
gem 'selenium-webdriver', '2.53.3'
gem 'capybara', '2.7.1'
gem 'factory_girl_rails', '4.7.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.1.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.5.0'
group :doc do
gem 'sdoc', '0.4.1', require: false
end
gem 'rails_12factor', '0.0.3'
How can I make this work?
You can fix this problem following steps:
First, you run gem update to update your gems.
And sprockets-rails should be at version 3.0.4
Second, open your Gemfile.lock in your rails project, modify the following line to update sprocket version
sprockets-rails (3.0.4)
Finally, you run bundle install
Above one is the answer,
You can fix this problem following steps:
First, you run gem update to update your gems.
And sprockets-rails should be at version 3.0.4
Second, open your Gemfile.lock in your rails project, modify the following line to update sprocket version
sprockets-rails (3.0.4)
Finally, you run bundle install

bundle install error activeadmin ransack

Am trying to install my own project onto a secondary computer - both are macosx 10.8.4, both setup using macports and RVM.
For some reason as I'm trying to bundle install I'm getting this error:
```
Bundler could not find compatible versions for gem "ransack":
In Gemfile:
activeadmin (>= 0) ruby depends on
ransack (>= 1.0.0) ruby
ransack (0.7.3)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
ransack (>= 0) ruby depends on
actionpack (>= 4.0.0) ruby
sass-rails (~> 4.0.0) ruby depends on
actionpack (4.0.0.beta1)
```
Not sure why bundle install works fine on one computer and not the other; I recently participated in this ransack issue on with activeadmin on github and it seemed to be fixed; unsure why it's popping up again.
UPDATE: gem file:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
gem 'ZenTest'
# Add Foundation Here
#gem 'compass-rails' # you need this or you get an err
# gem 'compass-rails', github: 'milgner/compass-rails', branch: 'rails4'
# gem 'zurb-foundation', '~> 4.0.0'
gem 'paperclip', '>= 3.4.0' # image upload
gem 'aws-sdk'
# gem 'bootstrap-sass', '~> 2.3.2.1'
gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
:github => 'anjlab/bootstrap-rails',
:branch => '3.0.0'
gem 'devise', github: 'plataformatec/devise'
gem 'devise_security_extension', :github => 'phatworx/devise_security_extension' # security questions
# administration
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
gem 'ransack', github: 'ernie/ransack', branch: 'rails-4'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'formtastic', github: 'justinfrench/formtastic'
gem "rich", github: 'bastiaanterhorst/rich'
# gem 'active_admin_editor'
gem 'survey', :git => 'git://github.com/runtimerevolution/survey.git'
# voting
# gem 'acts_as_votable', github: 'ryanto/acts_as_votable'
gem "acts_as_votable", "~> 0.7.1"
gem 'friendly_id', '5.0.0.beta4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
gem 'rspec-rails'
gem 'spork'
gem 'spork-rails', :github => 'sporkrb/spork-rails'
gem 'annotate'
end
group :test do
gem 'rspec'
gem 'autotest'
gem 'autotest-growl'
gem 'autotest-fsevent'
end
I think you don't want to use the rails-4 branch of ransack. It looks like the current master version supports Rails 4.
The dependency on the rails4 branch of activeadmin says that it needs ransack >= 1.0.0, but the version of ransack on the rails-4 branch is 0.7.3.
It is probably a better idea to use the released versions of gems from Rubygems unless you need specific unreleased fixes in the Git repo.

Why am I getting this simple error when using `acts_as_taggable_on`?

I wanted to set up ActsAsTaggableOn.strict_case_match = true
According to http://5minutenpause.com/blog/2012/11/20/careful-where-you-get-your-gems-from/, it seems I have to download the gem from github. So I made it that way and tried to run App.
However, it returns this error:(
Error message: (I've tried bundle install but still the same error message!)
git://github.com/mbleigh/acts-as-taggable-on.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
Exception class:
PhusionPassenger::UnknownError
Here are my codes!
config/initializer/tag_list.rb
ActsAsTaggableOn.delimiter = ','
ActsAsTaggableOn.remove_unused_tags = true
ActsAsTaggableOn.strict_case_match = true
Gemfile
gem 'acts-as-taggable-on', git: 'git://github.com/mbleigh/acts-as-taggable-on.git'
I made a try to change the source to download the gem directly from to rubyorg, not from the Github. It's just like this.
gem 'acts-as-taggable-on', '2.3.3'
Now it returns this error:(
Error message:
undefined method `strict_case_match=' for ActsAsTaggableOn:Module
How can I solve this?
UPDATE:
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'execjs'
gem 'therubyracer'
gem 'devise', '2.0.1'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'paperclip', "~> 3.0"
gem "cocaine"
gem 'mailboxer', '0.7.0'
gem 'sunspot_rails'
gem 'sunspot_solr'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
#gem 'rack-mini-profiler'
end
gem 'progress_bar'
gem 'kaminari', '0.14.0'
gem "sunspot_with_kaminari", '~> 0.1'
gem 'i18n_generators'
gem 'ancestry'
gem 'acts-as-taggable-on', '2.3.3'
gem 'acts_as_commentable_with_threading'
gem 'twitter-bootstrap-rails'
gem "less-rails"
gem 'crummy', '~> 1.6.0'
gem 'rails3_acts_as_paranoid'
gem 'galetahub-simple_captcha', :require => 'simple_captcha'
gem "acts_as_follower"
gem "jpmobile"
gem "rqrcode-rails3"
gem 'acts_as_votable', '~> 0.4.0'
gem 'rails3-jquery-autocomplete'
gem "cancan"
gem 'rinku', '1.5.1'
gem 'dalli'
gem "auto_html", '1.6.0'
gem "rails_autolink"
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'jquery-ui-rails'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
The problem is that the version 2.3.3 from acts-as-taggable-on was released 9 months ago and doesn't include the strict_case_match feature.
Your Gemfile has too look this this:
gem 'acts-as-taggable-on', git: 'git://github.com/mbleigh/acts-as-taggable-on.git'
the same way you had, and run:
bundle update acts-as-taggable-on
if that doesn't work, just delete your Gemfile.lock and run bundle install and bundle update
notice that its a development version of the gem, not ready for production, but you can take the risk and be a an alpha user of the gem and report any issue you find :)

Bundle install and update cannot find and install jQuery-rails 2.0.0

I'm trying to learn Rails from this website.
I'm on Windows so I used the recommended Rails-Installer. I need to have jquery-rails gem version 2.0.0 for the tutorial so in my gem file I have those:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.4'
gem 'coffee-rails', '~> 3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.2.3'
end
gem 'jquery-rails', '2.0.0'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
As it can be seen, I have gem 'jquery-rails', '2.0.0' line in Gemfile. However, when I run bundle update or bundle install I get this error:
bbundle install could not find gem ' jquery-rails (= 2.0.0) x96-mingw32' in any of the gem sources listed in your gemfile.
gem jquery-rails version '2.0.0' was yanked from rubygems
http://rubygems.org/gems/jquery-rails/versions/2.0.0
replace with
gem "jquery-rails", "~> 2.0.1"
and be happy

Resources