I'm using the "ruby on rails by example tutorial" (screencasts) by Michael Hartl and I'm getting some errors during the third lesson (sample app) while trying to do "bundle install".
I changed the Gemfile as shown in the tutorial, as shown in the website(the updated one), and even tried the final Gemfile for this tutorial. Every time I get a different error that something couldn't been install, and the bundle installation could not continue.
At first it said it about 'nokogiri', then 'json', and now 'bcrypt'. This did not happen when I did the first app and the demo app. maybe because now I tried added the rspec? I don't want to continue the tutorial without adding it to the Gemfile, because it sounds important.
I'm running osx lion 10.7.2, rails version 3.0.1.
Copying Gemfile code from comment into original post:
source 'rubygems.org';
gem 'rails', '3.0.1'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.0.0.beta.18'
end
group :test do
gem 'rspec', '2.0.0.beta.18'
end
update: I heard from someone that rspec is a gem used on tests, therefore you can't make a rails project without the default test and then change the gemfile. So why in the tutorial he make a "rails new sample_app -T" but afterwords changes the Gemfile so it uses rspec? he says, that they replace each other. that rspec replace the original test, and therefore you need to make a project without the original test. any thoughts on this?
I screwed around with this error for a few hours, then checked the rspec github page. Per their instructions, you need to include the path to github. So I made by Gemfile look like following and it now works:
group :development do
gem "rspec-rails", :git => "git://github.com/rspec/rspec-rails.git"
gem "rspec", :git => "git://github.com/rspec/rspec.git"
gem "rspec-core", :git => "git://github.com/rspec/rspec-core.git"
gem "rspec-expectations", :git => "git://github.com/rspec/rspec-expectations.git"
gem "rspec-mocks", :git => "git://github.com/rspec/rspec-mocks.git"
end
group :test do
gem "rspec-rails", :git => "git://github.com/rspec/rspec-rails.git"
gem "rspec", :git => "git://github.com/rspec/rspec.git"
gem "rspec-core", :git => "git://github.com/rspec/rspec-core.git"
gem "rspec-expectations", :git => "git://github.com/rspec/rspec-expectations.git"
gem "rspec-mocks", :git => "git://github.com/rspec/rspec-mocks.git"
gem 'webrat'
end
I am using Ruby 1.9.3, Rails 3.2.1, RVM 1.10.2, Bundler 1.0.21
Related
I keep getting this Money gem error
undefined method `assume_from_symbol' for Money:Class
I've tried everything from adding
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
and also tried
gem 'money', '~> 6.0.1'
I've tried doing a few clean installs as well. Same thing. Any fix?
Thanks
I'm using this version of Rails & Spree and it's working fine form me.
ruby "2.0.0"
gem 'rails', '4.0.2'
Spree app gems
gem "spree", "~> 2.1.4"
gem 'spree_auth_devise', :github => "spree/spree_auth_devise", :branch => '2-1-stable'
gem 'spree_variant_options', :github => "extragen/spree_variant_options", :branch => '2-1- stable'
================================================================================
Add this in your Gemfile
gem 'money', '6.0.1'
Run
bundle update
Restart the server.
Hope this will work and if still you are any issue then feel free to post exception here.
In order to overcome a bug with solr, I need to run a newer version than the one included in the Rubygems version of Sunspot. I noticed on Github that there has been a very recent commit which includes a newer version of Solr.
How do I configure my Gemfile to pull straight from the repo instead of from RubyGems. Currently I have the following;
gem 'sunspot'
gem 'sunspot_rails'
gem 'sunspot_test'
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
group :development, :test do
gem 'sunspot_solr'
gem 'progress_bar'
end
If I simply add the repo to the sunspot gem line, everything falls apart when I run bundle. As the sunspot_solr gem is within the sunspot repo, I don't know the line I should use to grab that from the repo.
Thanks,
Graeme
Got it! The answer is to point to the main repo on github and use require where appropriate to narrow it down to the relevant sub-section.
The edited Gemfile is as follows;
gem 'sunspot', :git => "git://github.com/sunspot/sunspot.git"
gem 'sunspot_rails', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_rails"
gem 'sunspot_test'
gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git'
group :development, :test do
gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git", :require => "sunspot_solr"
gem 'progress_bar'
end
I am not a ruby developer, but here is a walkthrough on Installing Gems from Git that may be helpful.
For some reason, my project has messed up and now its throwing errors every time I try to run bundle install. Somem of the errors i've managed to fix by reordering the gems in my Gemfile, but now i'm getting this one:
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
omniauth depends on
faraday (~> 0.7.3)
twitter depends on
faraday (0.6.1)
I thought that using bundler was supposed to erase dependency wtf's? I'm assumingn this message means that two gems want 2 different versions of faraday..?
How can I fix this problem though? Why doesn't it just install both versions, and each gem loads the version it wants?
I'd love some help on this please!
Thanks
Gemfile.lock:
https://gist.github.com/1061722
Gemfile:
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'
gem 'rails', '3.0.9' #, :git => 'git://github.com/rails/rails.git'
gem "haml-rails"
gem "jquery-rails"
# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'
# Allows us to keep an order of a user's items in their collection
gem "acts_as_list"
# Used to simplify user registrations and logins
# Pined to ref, as there is problem on devise HEAD
gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'
# Might not be used
gem "ajaxful_rating"
# Facilitates Edit-in-place functionality for certain data fields
gem "best_in_place", :git => 'git://github.com/moabite/best_in_place.git'
# Gem for uploading images. More flexible than "paperclip"
gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem "fog"
# Apparently needed to make the uploadify multifile uploader work
gem "flash_cookie_session"
# Used to that we can resize images uploaded through carrierwave, using
# ImageMagick
gem "rmagick"
# Easily create database models for site simulation
gem "factory_girl_rails"
# Useful for fake data generation
gem "faker"
gem "randexp"
gem "random_data"
gem 'forgery'
gem "lorempixum", :require => 'lorempixum'
gem "hashie"
# gem 'aws-s3', :require => 'aws/s3'
# gem 'bcrypt-ruby', :require => 'bcrypt'
# Provides a shorter syntax for building forms
gem 'formtastic'
# Sends notifications of errors on Production app
gem "hoptoad_notifier"
# Social Media Gems FB Connect, FB, and Twitter
gem "omniauth", :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
gem "fb_graph"
gem "twitter"
gem 'rake', '0.8.7'
gem "jammit"
gem "rest-client"
gem 'rails-erd', :git => "git://github.com/voormedia/rails-erd.git"
gem "nokogiri"
group :development, :test do
gem "guard"
gem "guard-ego"
gem "guard-bundler"
gem "guard-jammit"
gem "guard-rails"
gem "guard-rspec"
gem "guard-shell"
gem "guard-compass"
gem "guard-livereload"
gem 'rb-fsevent', :require => false
gem "rb-inotify", :require => false
gem "libnotify", :require => false
# Needed to run html2haml to convert html to haml
gem "hpricot"
gem "taps"
gem "heroku"
#gem "heroku-rails", :git => "git://github.com/railsjedi/heroku-rails.git"
gem "heroku-rails", :git => "git://github.com/sid137/heroku-rails.git"
gem "sqlite3-ruby", :require => 'sqlite3'
gem "ruby-debug19", :require => 'ruby-debug'
# nice table displays in Rails console
gem "hirb"
gem "facebook_test_users", :git => "git://github.com/sid137/facebook_test_users.git"
# Allows us to push the local development database up to Heroku, and pull the
# heroku db down locally
gem "yaml_db"
gem "escape_utils"
# Sass and Blueprint based css framework for dev machine
# use "compass compile . " to compile css before deployment
gem "compass", ">=0.11.1"
# Print a header in app/model/*.rb files, listing the db columns present for
# each model
gem "selenium-webdriver"
gem "rack-test"
gem "capybara", :require => 'capybara/rspec'
gem "launchy"
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'
gem "rspec-core", "2.6.4"
gem "rspec-rails"# , '2.6.0' #, '2.5.0'
#gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
#gem 'shoulda-matchers', :git => 'git://github.com/sid137/shoulda-matchers.git'
gem "ZenTest"
gem "autotest-rails"
end
The specific version of Omniauth that you're using depends on Faraday ~> 0.7.3, while the latest released version of Twitter gem needs 0.6.
You can fix this by using the latest version of Twitter gem from the repository.
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
I had the exact same issue and it got resolved by the following two lines in my Gemfile:
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
gem 'omniauth', :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
try deleting your Gemfile.lock (file) and then do
bundle install
My app works on Heroku until I add "gem 'aws-s3', :require => 'aws/s3'" to the gemfile. (I've also tried it with only the first part).
As soon as I add this and try to "heroku rake db:migrate" I get this error
"rake aborted!
no such file to load -- rails/all
/app/Rakefile:4"
It works fine with aws s3 on my local server, and it works fine on heroku up until I change the gemfile.
Any ideas?
edit
Here is the whole Gemfile
source 'http://rubygems.org'
gem 'rails'
gem 'devise'
gem 'omniauth'
gem 'nifty-generators'
gem 'paperclip'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'aws-s3'
group :development, :test do
gem 'rspec-rails'
gem 'annotate-models'
end
/edit
This is going to sound vague but i remember something about needing to specify the version of aws-s3 that i was using in order to get S3 to work properly on one of my Heroku apps. It might be worth trying:
config.gem "aws-s3", :version => ">= 0.6.2", :lib => "aws/s3"
Don't forget to:
bundle update
after changing your gemfile.
Sorry, been trying to rack my brain as to where i read this so as to back it up, worth a try though.
I am trying to configure Spree on Heroku, I have the website running
offline using thin but every now and again it will throw the error
"Error registering calculator Calculator::PriceBucket"
I have tried setting config.cache_classes to both on and off
Also my gem file is configured as shown
source 'http://rubygems.org'
# Generic gem dependencies first
gem 'rails', '3.0.7'
gem 'sqlite3', :group => :development
gem 'aws-s3'
# Followed by spree itself first, all spree-specific extensions second
gem 'spree', :git => 'git://github.com/spree/spree.git'
gem 'spree_active_shipping', :git => 'git://github.com/spree/spree_active_shipping.git'
gem 'spree_product_assembly', :git => 'git://github.com/spree/spree-product-assembly.git'
gem 'spree_static_content', :git => 'git://github.com/spree/spree_static_content.git'
gem 'spree_heroku', '1.0.0', :git => 'git://github.com/paxer/spree-heroku.git'
# EOFs
As is suggested here http://railsdog.lighthouseapp.com/projects/31096/tickets/1777-error-registering-calculator-calculatorpricebucket
How can I fix this?
Thanks
maybe this helps to you... price-bucket-calculator
I solved this by changing gem load order in the gemfile as specified at following URL:
http://railsdog.lighthouseapp.com/projects/31096/tickets/1777-error-registering-calculator-calculatorpricebucket