After following railstutorial.orgI am trying to run bundle install. It list use of gem like :
Using railties (3.0.7)
Using rails (3.0.7)
Using sass (3.1.3)
And this error :
Installing rbx-require-relative (0.0.5) /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:364:in `ensure_required_ruby_version_met': rbx-require-relative requires Ruby version ~> 1.8.7. (Gem::InstallError)
from /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:135:in `install'
...
I understand ruby 1.9.2 needs rbx-require-relative, but why it doesn't want to install it. It demand ruby ruby 1.8.7. I am little lost.
Further more after this error it stop, and my gem in my Gemfile are never read or installed...
I'm using ruby 1.9.2p180 and rails 3.0.7
Thanks for your help
rbx-require-relative is a port of Ruby 1.9’s relative_relative for Rubinus and MRI 1.8
If you're running ruby1.9 then you don't need it. Remove it from your Gemfile.
Don't require ruby-debug in your Gemfile as it has rbx-require-relative as a dependency.
Add gem 'ruby-debug19' instead
You might try to install the the ruby-debug19 gem for ruby 1.9.2.
Here is the gem info:
http://rubygems.org/gems/ruby-debug19
Here is the bundler line:
gem 'ruby-debug19'
Replacing
gem 'ruby-debug'
with
gem 'ruby-debug', :platforms => :ruby_18
gem 'ruby-debug19', :platforms => :ruby_19
in my Gemfile solved this problem for me, working on both Ruby 1.8 and 1.9.
Related
I'm trying to upgrade to latest haml gem. Here is the part of the Gemfile:
gem "haml", "~> 4.0.2"
gem "haml-rails", "~> 0.4", :group => :development
However, it seems that another gem:
gem "dj_mon", "~> 1.1.0"
requires an older version of haml. So when I run bundle update, I get:
Bundler could not find compatible versions for gem "haml":
In Gemfile:
dj_mon (~> 1.1.0) ruby depends on
haml (~> 3.1) ruby
haml (4.0.2)
Any idea on how to fix this?
You have a dependency conflict. I'm not an expert on this, but it seems to me you have two choices:
Update to the latest version of haml which is compatible with dj_mon (I think 3.1.8), and then wait until the maintainers of the gem update its dependencies, at which point the conflict is gone.
If you really want to use the latest version of haml, then you could fork the dj_mon gem, update the dependency, run the tests for the gem and if all goes well, you can just replace the dependency with your forked version for the time being.
Hope that helps.
I have rails 3.017, and clearance 1.0.0.rc2 and trying to install gem 'jquery-rails', '~> 2.1'
Do I need an older version of jquery-rails? If so, how can I figure this out?
thanks
Joel
Bundler could not find compatible versions for gem "railties":
In Gemfile:
jquery-rails (~> 2.1) ruby depends on
railties (< 5.0, >= 3.1.0) ruby
clearance (= 1.0.0.rc2) ruby depends on
railties (3.0.17)
Yes, you need an older version of this gem. If you don't specify a certain version of jquery-rails in your Gemfile, Bundler will find the matching version for you, if you run bundle install.
You can find out the dependencies of a gem with the gem manager:
$ gem dependency jquery-rails -v 2.1.3
I am following rails casts episode 192 for cancan (http://railscasts.com/episodes/192-authorization-with-cancan?autoplay=true).
I have ruby 1.9.3
and rails 3.2.3
My gem file has this content
group :test, :development do
gem 'rspec-rails', '~> 2.5'
end
group :test do
gem 'cucumber-rails', '1.0.6'# use this instead of the one in the book
gem 'capybara'
gem 'database_cleaner'
end
gem 'dynamic_form'
gem 'factory_girl'
gem 'devise', '~>1.4.3'
gem 'email_spec'
gem 'cancan'
and in the environment.rb file I have added
config.gem 'cancan'
when I run bundle command I see this...
Using warden (1.0.6)
Using devise (1.4.9)
Using dynamic_form (1.1.4)
Using rspec-core (2.11.0)
Using rspec-expectations (2.11.1)
Using rspec-mocks (2.11.0)
Using rspec (2.11.0)
Now my question is: when I run:
sudo rake gems:install
then why do I see this:
Could not find warden-1.0.6 in any of the sources
Run `bundle install` to install missing gems.
and also in my gem.lock file why does it show...
devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
That railscast is from Dec 14, 2009 back when Rails 2 was the standard.
You should go through the instructions at https://github.com/ryanb/cancan which focus more on Rails 3 and Bundler.
bundle install will install your Gemfile contents into your current RVM gemset, in this case, probably the default gemset. Do NOT use sudo to install gems. To list the gems installed in the gemset, just run gem list. Run bundle list to show all of the gems in the current application bundle.
I took a look about this problem within the list of question but nothing helped.
This is my first question in stackoverflow so please accept my apologies in case I do something wrong. Also I still have a lot of english to improve.
I'm installing Spree following the github instructions
$ gem install spree
$ rails new my_store
$ spree install my_store
when I get this message
...
Admin Password [spree123]
gemfile spree
gemfile spree_usa_epay
gemfile spree_skrill
run bundle install from "./my_store"
git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
precompiling assets
git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
...
Well, as the guide suggests, in case of circular dependency issues do:
$ gem install spree_cmd
$spree install my_store -A
gemfile spree
gemfile spree_usa_epay
gemfile spree_skrill
run bundle install from "./my_store"
git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
precompiling assets
git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
I changed directory to the app and run the command:
$cd my_store
$bundle install
and I get the following error
Bundler could not find compatible versions for gem "rails":
In Gemfile:
spree_usa_epay (>= 0) ruby depends on
rails (<= 3.1.3, >= 3.1.1) ruby
rails (3.2.1)
after this I changed the gem file to work with rails 3.1.3 and coffeescript gems and repeat the whole process again and I get this.
Users/Snake/.rvm/gems/ruby-1.9.3-p0/gems/activerecord- 3.1.3/lib/active_record/base.rb:1088:in `method_missing': undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class (NoMethodError)
from /Users/Snake/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.1.3/lib/active_record/railtie.rb:59:in `block (3 levels) in <class:Railtie>'
It think it might be something with version of rails a spree but I don't know were to start.
Does anybody had this issue before?
I running Mac OS X 10.5.8
rails 3.2.1
ruby 1.9.3p0 (2011-10-30 revision 33570) [i386-darwin9.8.0]
ImageMagick #6.7.4-6_0+q16
As #Anatoly Ruchka suggested the problem was using rails 3.2.1, so I switched to 3.1.3.
This is what I did, I found a post of #vonconrad where he explain how to create a rail project without touch the installation.
1) I create a directory folder for my project:
$mkdir old_rails313
$cd old_rails313
$touch gemfile
$nano gemfile
2)
I pasted a gemfile definition specifying as you mention the version of rails I want, so it looks like this
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'sqlite3'
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.8.0.rc1", :group => [:development, :test]
gem "factory_girl_rails", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.2.0", :group => :test
gem "capybara", ">= 1.1.2", :group => :test
gem "database_cleaner", ">= 0.7.0", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
#gem "devise", ">= 1.5.0"
gem 'spree','1.0.0'
3) then I run
bundle install
bundle exec rails new .
rails g spree:install
rails s
After installing I've got a conflict with the gem 'spree','1.0.0', so I comment it out.
Also I've got a warning but it works:
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.spree/order" is no longer supported
Thanks a lot
I think you should use rails version 3.1.3 for spree_usa_epay
TO do that you should uninstall all rails what you have on machine
to watch use
gem list -d rails
than
sudo gem uninstall rails -v ...
and create new project with
rails new my_store
than edit Gemfile and paste
gem 'spree', '1.0.0'
and
bundle install
well done
rails server
I'm trying to setup my ruby on rails dev environment on my macbook pro but running into this error:
/usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:289:in load': uninitialized constant
Psych::Syck (NameError) from
/usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:289:in_load'
I tried using another yaml engine by specifying syck in config/boot.rb but that didn't work.
require 'yaml'
YAML::ENGINE.yamler= 'syck'
I'm using
Rails 3/Ruby 1.9.2-p180/Bundler 1.0.10/RubyGems 1.6.2. I installed ruby 1.9.2 via brew.
Update rubygems worked for me.
gem update --system
If you have this :
gem "rspec-rails", ">= 2.0.0.beta.20"
remove ', ">= 2.0.0.beta.20"'
gem "rspec-rails"
It works for me
GemCutter rake build now throws "undefined method 'write' for #<Syck::Emitter:...." after updating to rubygems 1.5.0 on ruby 1.9.2 on Windows maybe related?