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.
Related
I'm upgrading an app to Rails 3 and have been going through it bit by bit, for example replacing all the old plugins with the relevant gems in the gemfile.
I seem to have got stuck however because now whenever I try to run the server I get this:
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551#rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStackError)
I've been googling it for ages and have come to the conclusion that it is still because of one of the plugins, I just can't figure out which one. I have removed each one individually but none of them makes a difference.
I found these three similar questions but they don't really help me....
Stack level too deep error after running bundle update
SystemStackError at the rack level in Ruby 1.9.2, not 1.8.7
Stack level too deep trying to update from 3.0 to 3.1
My gemfile looks like this at the moment:
source 'https://rubygems.org'
gem "rails", "3.0.0"
#need to replace old acts_as_commentable vendor plugin
gem 'acts_as_commentable', '3.0.1'
gem "airbrake"
#need to add authlogic gem
gem 'authlogic', '~> 2.1.6'
gem "aws-s3"
gem "bj"
gem "bundler", "~> 1.0.0"
gem "calendar_date_select", "1.15"
gem "cancan", "1.2.0"
gem "carmen"
#replace plugin casein?
gem 'casein', '3.1.0'
gem 'comma', '0.4.1'
gem 'exifr'
# factory_girl 1.2.4 wasn't working with Rails 3 - consider an upgrade to factory_girl_rails?
# gem "factory_girl", "1.2.4"
gem 'fastercsv'
gem "geokit"
#need to replace above with below
gem 'geokit-rails'
gem "haml"
gem "hpricot"
gem 'hoptoad_notifier'
gem "jrails"
gem "libxml-ruby", "2.4.0"
gem "memcached", "~> 1.8.0"
#memcached no longer works?
gem 'dalli'
# Not sure why we have this if we're using SQLite3
gem "mysql2", "~> 0.2.6"
#TODO: changed by almazom
gem "rake", "0.8.4"
gem 'recurly'
gem "rdoc"
gem "rmagick"
gem "rspreedly"
gem "rubyzip"
gem 'sass'
# searchlogic not supported for rails3
# gem 'searchlogic'
gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
#need to use simplecov when upgrading to ruby 2 as rcov doesn't work
gem "simplecov"
gem 'sqlite3'
# tmail no longer included in rails 3?
gem 'tmail'
#need to upgrade will_paginate for casein...?
# gem "will_paginate", "2.3.16"
gem 'will_paginate', '3.0.4'
gem 'yaml_db'
group :development, :test do
gem 'test-unit', '1.2.3'
gem 'rspec', '1.3.2'
gem 'rspec-rails', '~> 1.3.4'
end
group :test do
gem 'capybara', '0.3.5'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :git => "git://github.com/RKelln/cucumber-rails.git", :branch => "0.3.2-capybara-fix"
gem 'database_cleaner'
end
And the plugins I have are:
acts-as-favorite-updated
acts_as_configurable
acts_as_follower
better_logging
concerned_with
default_value_for
fast_context
fetcher
has_many_friends
jrails
paperclip
parallel_tests
rails_upgrade
yaml_db
Does anyone have any idea how I can deal with this issue?? :-(
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.
Since i migrated from Rails 3.0 to Rails 3.1 i get these warnings :
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please
use class_attribute method instead. Notice their behavior are slightly
different, so refer to class_attribute documentation first. (called
from require at
/Users/vincentdaubry/.rvm/gems/ruby-1.9.2-p318#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:74)
I do not have any reference to class_inheritable_attribute in my code.
I guess one of the gem i'm using is producing this error, but how can i know which one ? Or is there something else to do to fix this warning ?
EDIT 2 :
None of the gem i'm using has any reference to class_inheritable_attribute (i tried to ack "class_inheritable_attribute" in the gem directory).
If i deploy my app on another computer on rails 3.1.3 that doesn't use RVM i dont get the warning, so i think it comes from RVM. Does it sound reasonable ?
I tried to update RVM with rvm get stable but i still get the warning..
Any ideas ?
EDIT :
Here is my gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'paperclip', '2.4.5'
gem 'pdf-toolkit', '0.5.0'
gem 'omniauth-facebook', '1.2.0'
gem 'delayed_job', '2.1.4'
gem 'devise', '1.5.3'
gem 'mini_magick', '3.4'
gem 'faraday', '0.6.1' #WARNING : this faraday version is specify, because on 0.7.5 this breaks facebook connection
gem 'acts-as-taggable-on', '2.2.2'
gem 'kaminari', '0.13.0'
gem 'forem', :git => "git://github.com/radar/forem.git"
gem 'forem-redcarpet', :git => "git://github.com/radar/forem-redcarpet"
gem 's3_swf_upload', :git => 'https://github.com/nathancolgate/s3-swf-upload-plugin.git'
gem 'aws-s3', '0.6.2', :require => 'aws/s3'
gem 'jquery-rails', '1.0.13'
gem 'dalli', '1.1.4'
gem 'bson', '1.5.2'
gem 'bson_ext', '1.5.2'
gem 'exception_notification_rails3', '1.2.0', :require => 'exception_notifier'
######################################################################
# unused
######################################################################
#gem 'newrelic_rpm', '3.3.1'
#gem 'mongo', '1.5.2'
#gem 'mongoid', '2.4.0'
#gem "rdiscount"
######################################################################
# Environment specific
######################################################################
group :development, :test do
gem 'sqlite3'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'mocha'
end
group :production do
gem "pg"
end
Thanks,
Vincent
You can grep by code of all installed gems to find all entries of class_inheritable_attribute. When you find it, try to update it.
It's bundler depreacation. Try update bundler. So far it works well with bundler 1.0.22
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
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