Cant get spree to install on rails 4 - ruby-on-rails

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.

Related

Upgrading rails 3.0.0 to 3.2.13

Please help me that how to upgrade rails 3.0.0 to rails 3.2.13.
This is my GemFile and what changes are to be made here?
# Edit this Gemfile to bundle your application's dependencies.
# This preamble is the current preamble for Rails 3 apps; edit as needed.
source 'http://rubygems.org'
gem 'eventmachine'
gem 'rails', '3.0.0'
#gem 'parseexcel'
gem 'will_paginate', ">=3.0.pre", :require => 'will_paginate'
gem 'gbarcode',:git =>'git://github.com/cameroncox/gbarcode.git',:branch =>'ruby1.9'
gem "pg"
gem "attr_encrypted"
gem "spreadsheet", "~> 0.7.5"
#gem "spreadsheet-excel"
#gem 'jquery-rails'
gem 'prototype_legacy_helper', '0.0.0', :git => 'git://github.com/rails/prototype_legacy_helper.git'
#gem "dynamic_form" this is for depricate the "error_message for " helper in rails 3
gem 'time_diff', '0.3.0'
gem "fastercsv"
gem 'rails-dev-boost', :git => 'git://github.com/thedarkone/rails-dev-boost.git', :require => 'rails_development_boost'
#gem "galetahub-simple_captcha", :require => "simple_captcha"
unfortunately the changes from Rails 3 to 3.2.x aren't only the Gems.
It was also introduced the assets pipeline and some other changes.
Edit I was wrong about it, actually the assets pipeline was introduced on Rails 3.1.
Ryan Bates has a really nice screencast about this upgrade
http://railscasts.com/episodes/318-upgrading-to-rails-3-2
I would also recommend you to read the release notes, to get a better understand of rails 3.2 capabilities.
http://guides.rubyonrails.org/3_2_release_notes.html Edit And also the release notes for 3.1 http://guides.rubyonrails.org/3_1_release_notes.html
I hope it helps.

"bundle install" error

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

How do I use the edge version of Sunspot direct from Github instead of via Rubygems?

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.

How do I fix this gem dependency problem in Rails 3 (bundler)?

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

Spree 0.50.0 Error registering calculator Calculator::PriceBucket

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

Resources