Using a prerelease gem to satisfy a transitive dependency with Bundler - ruby

I'm using RSpec with Guard, and targeting RSpec 3.0.0.rc1. guard-rspec has the following in its gemspec:
s.add_dependency 'rspec', '>= 2.14', '< 4.0'
and in my Gemfile, I am specifying:
gem 'guard-rspec', require: false
gem 'rspec-rails', '~> 3.0.0.rc1'
When I run bundle update, I get the following output:
Bundler could not find compatible versions for gem "rspec-expectations":
In Gemfile:
rspec (< 4.0, >= 2.14) ruby depends on
rspec-expectations (~> 2.14.0) ruby
rspec-rails (~> 3.0.0.rc1) java depends on
rspec-expectations (3.0.0.rc1)
How can I make this configuration resolve properly?

You should also add gem 'rspec', '~> 3.0.0.rc1' to your Gemfile

Related

Ruby gem dependency issue

Can anyone help me solve this Ruby gem dependency issue??
I'm trying to install this library described here
http://datagraph.rubyforge.org/sinatra-linkeddata/#Dependencies
Bundler gives me the following error. (Does it seem like there is an incompatibility between the 'linkeddata' gem and the 'sinatra-linkeddata' gem I'm trying to install.
Bundler could not find compatible versions for gem "linkeddata":
In Gemfile:
sinatra-linkeddata (>= 0) ruby depends on
linkeddata (~> 0.2.0) ruby
linkeddata (1.1.1)
My gem file looks like this: how should I modify it.
source 'https://rubygems.org'
gem "nokogiri"
gem 'sinatra'
gem 'rdf'
gem 'sparql'
gem 'linkeddata'
gem 'sass'
gem 'tilt', '>= 1.3.4', '~> 1.3'
gem 'thin'
gem 'sinatra-linkeddata'
Try running bundle update. If that doesn't work you can modify gem 'linkeddata' to gem 'linkeddata', '~> 0.2.0' in order to match the dependency of sinatra-linkeddata and then run bundle update linkeddata

Octopress Posix Error

I'm trying to generate a blog with octopress. When I do rake deploy I get this error:
Could not find posix-spawn-0.3.6 in any of the sources
Run `bundle install` to install missing gems.
bundle install:
Using rake (0.9.2.2)
Using RedCloth (4.2.9)
Using posix-spawn (0.3.6)
Using albino (1.3.3)
Using blankslate (2.1.2.4)
Using chunky_png (1.2.6)
Using fast-stemmer (1.0.1)
Using classifier (1.3.3)
Using fssm (0.2.9)
Using sass (3.2.1)
Using compass (0.12.2)
Using directory_watcher (1.4.1)
Using ffi (1.0.11)
Using haml (3.1.7)
Using kramdown (0.13.8)
Using liquid (2.3.0)
Using syntax (1.0.0)
Using maruku (0.6.0)
Using jekyll (0.11.2)
Using rubypython (0.5.3)
Using pygments.rb (0.2.13)
Using rack (1.4.1)
Using rack-protection (1.2.0)
Using rb-fsevent (0.9.1)
Using rdiscount (1.6.8)
Using rubypants (0.2.0)
Using tilt (1.3.3)
Using sinatra (1.3.3)
Using stringex (1.4.0)
Using bundler (1.1.5)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is
installed.
I have the right version of posix-spawn installed, so I'm not sure how to fix this error. I even recompiled it with my package manager, and still get the same error.
-- Gemfile
source "http://rubygems.org"
group :development do
gem 'rake', '~> 0.9.2'
gem 'rack', '~> 1.4.1'
gem 'jekyll', '~> 0.11.2'
gem 'rdiscount', '~> 1.6.8'
gem 'pygments.rb', '~> 0.2.12'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.6'
gem 'compass', '~> 0.12.1'
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'liquid', '~> 2.3.0'
end
gem 'sinatra', '~> 1.3.2'

can't install gem dm-adapter-simpledb

any idea what should I do? this is error message from bundler
$ bundle install
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "dm-core":
In Gemfile:
dm-adapter-simpledb (>= 0) ruby depends on
dm-core (~> 0.10.0) ruby
dm-core (1.2.0)
here is my Gemfile
source 'http://rubygems.org'
gem 'sinatra'
gem 'json'
gem 'prawn'
gem 'prawn-graph'
gem 'prawn-layout'
gem 'prawn-fast-png'
gem 'prawn-qrcode'
gem 'data_mapper'
gem 'dm-core'
gem 'dm-mysql-adapter'
gem 'dm-postgres-adapter'
gem 'dm-migrations'
gem 'dm-adapter-simpledb'
gem 'aws-sdk', '~> 1.3.4'
gem 'dm-paperclip'
gem 'savon'
gem 'rmagick'
gem 'SystemTimer', :require => "system_timer", :platforms => :ruby_18
gem 'rack-timeout'
gem 'rufus-scheduler'
gem 'mail'
Try to remove dm-core gem from the Gemfile. You don't need it anyway - dm-adapter-simpledb requires it.
If you absolutely must include dm-core gem in the Gemfile, set it to the version required by dm-adapter-simpledb in Gemfile.lock.
dm-adapter-simpledb in your gemfile depends on dm-core version 0.10.0, the one you have is 1.2.0. either remove it as Lukas suggested or update your gemfile: `dm-core', '~> 0.10.0'

Could not find sprockets-2.0.0.beta.10 in any of the sources

I am specifically intertested in #270. You can see it here: http://railscasts.com/episodes/270-authentication-in-rails-3-1
I've downloaded the code, unzipped it and I'm in the auth-before directory.
I run bundle install and I get
Fetching source index for http://rubygems.org/
Could not find sprockets-2.0.0.beta.10 in any of the sources
I've tried fixing it my self and I've gotten this:
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
sprockets (~> 2.0) ruby
sass-rails (~> 3.1.0.rc) ruby depends on
sprockets (2.0.0.beta.10)
My gem file looks like this:
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc4'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
What should I do to resolve this?
update:
I followed the suggestion below and removed the version number from sass-rails. When I run the update command I get the following:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
sass-rails (>= 0) ruby depends on
railties (~> 3.1.0) ruby
rails (= 3.1.0.rc4) ruby depends on
railties (3.1.0.rc4
Remove the version limitation on sass-rails from your Gemfile, then run
bundle update sprockets sass-rails
Both sass-rails and sprockets have a stable release now.

Railties dependency issues when upgrading to rails 3.1

I have the following gemfile:
source 'http://rubygems.org'
source 'http://gems.engineyard.com'
gem 'rails', '~> 3.1.0.rc4'
gem 'sass-rails', :git => 'https://github.com/rails/sass-rails.git'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'fancy-buttons'
gem 'haml'
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'#, :branch => 'rails3'
gem 'nokogiri'
gem 'bundler'
gem 'resque'
gem 'resque-meta'
gem 'jquery-rails'
gem 'rake', '~> 0.8.7'
gem 'eventmachine'
gem 'em-websocket'
gem 'json'
gem 'coffee-script'
gem 'uglifier'
Whenever I run bundle install, I get the following error:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
sass-rails depends on
railties (~> 3.2.0.beta)
rails (~> 3.1.0.rc4) depends on
railties (3.1.0.rc4)
Can anyone suggest a solution?
Remove, or comment out, the following:
# , :git => 'https://github.com/rails/sass-rails.git'
Explanation: it has been a while since the last release candidate of Rails 3.1 has been released, a sass-rails gem has been released that works with 3.1 so no need to pull sass-rails from git, and sass-rails master is now looking forward towards Rails 3.2.
try bundle update, that worked for me... Maybe delete all gems, and update rails first, then put gems back and run bundle update again?

Resources