In my Rails app, I've updated Ruby from 1.9.3 to 2.1.0. Now when I restart my tests I get an error:
NameError: uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
Here are gems in the Gemfile:
gem 'rails'
gem 'mysql2'
gem 'json'
gem 'jquery-rails'
gem 'kaminari'
gem 'therubyracer'
gem 'devise'
gem 'rak'
gem 'rails-translate-routes'
gem 'routes'
group :assets do
gem 'sass-rails', " ~> 3.2.3"
gem 'uglifier', ' >= 1.0.3'
end
group :development, :test do
gem 'factory_girl_rails'
end
group :test do
gem 'shoulda'
gem 'database_cleaner'
gem 'capybara'
end
Here's the stack trace:
`NameError: uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
~/.rvm/gems/ruby-2.1.0#kalender/gems/mocha-0.10.5/lib/mocha/integration/mini_test/version_230_to_262.rb:19:in `run'`
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:17:in `run'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:425:in `_run__4401979439353622961__setup__4295356768171603498__callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:663:in `block in _run_suites'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `each'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `_run_suites'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:27:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:780:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:372:in `block (2 levels) in autorun'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:33:in `run_once'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:371:in `block in autorun'
I just came across a bug that is similar or identical to this one and was able to resolve it locally. For me, I had a trace that begins with:
/home/youruser/.rvm/gems/ruby-2.1.0/gems/mocha-0.10.5/lib/mocha/integration/mini_test/version_230_to_262.rb:19:in `run': uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL (NameError)
This shows that the error is actually occurring in mocha when it tries to reference a constant that has been removed from the version of minitest that likely came along with your Ruby upgrade.
For me, doing a bundle update mocha fixed the problem.
Doing a bit of code spelunking to figure out specifically where the problem was fixed, I used the "git pickaxe" (git log -SSUPPORTS_INFO_SIGNAL) on a cloned copy of the mocha repository, and it seems like this commit removed the reference to SUPPORTS_INFO_SIGNAL, so using anything after that commit in mocha should be ok.
If upgrading your version of mocha doesn't solve the problem, take a close look at the stack trace and you should see which library that depends minitest having SUPPORTS_INFO_SIGNAL defined is causing the error. Then look upstream in that dependency to see if this problem was fixed. If not, fork the dependency you're using that exhibits this behavior and push your own patch upstream.
Related
I'm having the following error when running the console in heroku (heroku run console...). The application is running without problems, but I seem to be unable to run the console because of this and in development I'm not having this issue.
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/test_case.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/console/app.rb:2:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:304:in `initialize_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:152:in `load_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:27:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is my Gemfile:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.9'
gem 'oauth', '~> 0.4.4'
gem 'twitter', '~> 1.4.1'
gem 'sendgrid'
gem 'koala'
gem 'therubyracer', '0.10.2'
gem 'execjs'
# Rails 3.1 - Asset Pipeline
gem 'json'
group :assets do
gem 'sass-rails', " >= 3.2.3"
gem 'coffee-rails', ">= 3.2.1"
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass'
end
gem 'coffee-script'
gem 'jquery-rails'
gem "fog"
gem 'bootstrap-wysihtml5-rails', '0.3.1.10'
group :production do
gem "heroku"
gem 'pg', '0.13'
gem 'newrelic_rpm'
gem 'newrelic_api'
end
group :test do
gem 'email_spec'
gem "cucumber-rails"
gem "rspec-rails"
gem "capybara"
gem 'culerity'
gem "selenium-webdriver"
gem "database_cleaner"
gem 'factory_girl_rails'
end
group :development, :grades, :test do
gem "launchy"
gem "mysql2"
gem "letter_opener"
gem "pry"
gem "rails-erd"
end
gem "airbrake"
gem "authlogic"
gem 'awesome_print'
gem 'cancan'
gem 'dalli'
#gem "oink"
gem 'validates_timeliness', '~> 3.0.2'
gem 'hpricot'
gem "ruby_parser"
gem "prawn_rails"
gem "thin"
gem "nested_form", :git => "git://github.com/ryanb/nested_form.git"
gem "meta_search"
gem "carrierwave"
gem "aws-s3"
gem "mini_magick"
gem 'will_paginate'
gem "spreadsheet"
gem "oauth-plugin", ">= 0.4.0.pre1"
gem 'flash_cookie_session'
gem 'haml-rails'
gem 'squeel'
gem 'rails_best_practices', :group => :development
gem 'simple_form'
gem 'taps', :group => :development
gem 'resque'
gem "audited-activerecord", "~> 3.0"
gem "lograge"
gem 'quiet_assets'
gem 'yajl-ruby', :require => "yajl"
gem 'switch_user'
I've got no idea why I'm getting this error. Any thoughts? Thanks
With Rails 3.1.12 and Ruby 2.2.0 I had to add
gem 'test-unit'
to my Gemfile.
Removing test in the .slugignore file works for me.
Apparently Heroku has changed the way it interprets the .slugignore file.
In my case, I had rpc directory in .slugignore and it wiped out rpc subdirectory of one of the gems my app is depending on, which resulted in LoadError. I'm unsure Heroku made this change intentionally. Regardless of whether .slugignore is working as they expect, removing affecting line(s) from .slugignore should fix the issue for now.
P.S. I've raised a support ticket to Heroku on this.
UPDATE: As per Heroku support, there were some changes to .slugignore parsing to make it more consistent with .gitignore, and it is working as intended. The right way to only delete the top level directory is putting /rpc instead.
Removing test dir from .slugignore fixed the issue
Remove test dir from .slugignore
We also ran into this issue today. I suspect something must have changed in Heroku's Ruby build pack.
For us it was a problem with prototype-rails trying to load ActionView::TestCase which in turn requires test/unit/testcase. The patch is pretty simple and is available as a fork.
If you're using Bundler, you might want something like:
gem 'prototype-rails', :git => 'git://github.com/ennova/prototype-rails.git'
I tried disabling multithreading (comment out config.threadsafe!) and that seems to work for now until heroku gets their act together.
I have been running Guard for RSPEC and using the growl_notify gem for a while now (2-3 months), but now I cannot get guard to run in any of my Rails 3.1.1 projects. I've done some research on the error itself, but couldn't come up with anything conclusive (except someone else has the same issue).
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'spreadsheet' # Allows for reading/writing Excel files. We also need a CSV importer, but that can come later
gem 'gmaps4rails' # Allows for Google Maps Pushpins/Markers/Places
gem 'scoped_search' # For Searching
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git" # For File Uploads
group :test, :development do
gem 'sqlite3'
gem 'turn', '<0.8.3'
gem 'rspec-rails'
gem 'capybara'
gem 'guard-rspec'
gem 'growl_notify'
gem 'launchy'
gem 'capistrano' #You don't want Capistrano on the production side (I think)
end
group :production do
gem 'pg' #use postgres for database installation as the database
end
Error:
Thomas#Thomas-Cannons-MacBook-Pro:~/development/rails/tasks$ guard
/Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/rb-appscript-0.6.1/lib/appscript.rb:542:in `_send_command': CommandError (Appscript::CommandError)
OSERROR: -10000
MESSAGE: Apple event handler failed.
COMMAND: app("/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").register({:all_notifications=>["success", "pending", "failed", "notify"], :as_application=>"Guard", :default_notifications=>"notify"})
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in `method_missing'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/growl_notify-0.0.3/lib/growl_notify.rb:29:in `register'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/growl_notify-0.0.3/lib/growl_notify.rb:19:in `config'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifiers/growl_notify.rb:42:in `available?'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard- 0.9.4/lib/guard/notifier.rb:117:in `add_notification'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `block in auto_detect_notification'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `each'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `any?'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/notifier.rb:154:in `auto_detect_notification'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard- 0.9.4/lib/guard/notifier.rb:80:in `turn_on'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard.rb:184:in `start'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/lib/guard/cli.rb:74:in `start'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor- 0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor- 0.14.6/lib/thor.rb:263:in `dispatch'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.9.4/bin/guard:6:in `<top (required)>'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/bin/guard:19:in `load'
from /Users/Thomas/.rvm/gems/ruby-1.9.2-p290/bin/guard:19:in `<main>'
Here's what worked for me. Two things:
First, Guard 0.10.x. requires Growl >= 1.3. Install Growl 1.3 from the App Store (thew reviews are really bad, but I had no trouble).
Second, the new Guard versions recommend ruby_gntp. Simply replace gem 'growl_notify' with gem 'ruby_gntp'.
This appears to be a version mismatch between Growl and growl_notify. growl_notify 0.0.3 changed the Growl application name, which near as I can tell changed with Growl 1.3 (Lion only)
I believe it works out to:
use growl_notify 0.0.2 for Growl < 1.3
use growl_notify 0.0.3 for Growl >= 1.3
use growl gem (what I did)
I'm trying to push to heroku using
git push heroku master
It gets stuck when trying to access rubygems:
-> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc.5
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
Fetching gem metadata from http://rubygems.org/.......
/app/slug-compiler/lib/utils.rb:62:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp/build_38k3w88w3yxzg /app/tmp/repo.git/.cache' exit_status=0 out='' event=timeout elapsed=596.7476198673248 (Utils::TimeoutError)
from /app/slug-compiler/lib/utils.rb:48:in `loop'
from /app/slug-compiler/lib/utils.rb:48:in `block in spawn'
from /app/slug-compiler/lib/utils.rb:44:in `popen'
from /app/slug-compiler/lib/utils.rb:44:in `spawn'
from /app/slug-compiler/lib/buildpack.rb:35:in `block in compile'
from /app/slug-compiler/lib/buildpack.rb:33:in `fork'
from /app/slug-compiler/lib/buildpack.rb:33:in `compile'
from /app/slug-compiler/lib/slug.rb:464:in `block in run_buildpack'
from /app/slug-compiler/lib/utils.rb:117:in `log'
from /app/slug-compiler/lib/slug.rb:702:in `log'
from /app/slug-compiler/lib/slug.rb:463:in `run_buildpack'
from /app/slug-compiler/lib/slug.rb:107:in `block (2 levels) in compile'
from /app/slug-compiler/lib/utils.rb:98:in `block in timeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /app/slug-compiler/lib/utils.rb:98:in `rescue in timeout'
from /app/slug-compiler/lib/utils.rb:93:in `timeout'
from /app/slug-compiler/lib/slug.rb:96:in `block in compile'
from /app/slug-compiler/lib/utils.rb:117:in `log'
from /app/slug-compiler/lib/slug.rb:702:in `log'
from /app/slug-compiler/lib/slug.rb:95:in `compile'
from /app/slug-compiler/bin/slugc:85:in `block in <main>'
from /app/slug-compiler/lib/slug.rb:472:in `block in lock'
from /app/slug-compiler/lib/repo_lock.rb:44:in `call'
from /app/slug-compiler/lib/repo_lock.rb:44:in `run'
from /app/slug-compiler/lib/slug.rb:472:in `lock'
from /app/slug-compiler/bin/slugc:66:in `<main>'
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:[app].git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:[app].git'
this is my gemfile
source 'http://rubygems.org'
gem 'rails'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :group => :development
gem 'gravatar_image_tag'
gem 'acts_as_follower', "~> 0.1.1"
group :development do
gem 'rspec-rails'
gem 'annotate'
end
gem 'faker'
gem 'pg'
gem 'jquery-rails'
gem 'thumbs_up'
gem 'kaminari'
group :test do
gem 'rspec'
gem 'webrat'
gem 'factory_girl_rails'
end
gem 'therubyracer', :platforms => :ruby
gem 'execjs', "~> 1.2.9"
gem 'activeadmin'
gem 'meta_search'
gem 'sass-rails'
group :assets do
gem 'coffee-rails'
gem 'uglifier'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
This never happened before.
The change in the gemfile was that I added acts_as_follower. All gems are updated using bundle update
What can I do to fix this?
Update:
I also tested heroku run bundle update and it stalls as well...
Update 2:
I now get
>git push heroku master
Enter passphrase for key '/c/Users/Me/.ssh/id_rsa':
Counting objects: 214, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (182/182), done.
Read from remote host heroku.com: Connection reset by peer
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git#heroku.com:[app].git'
Is it still occuring now? It would seem that the problem isn't yours to fix but Heroku's.
Did you check https://status.heroku.com/ when the problem was occuring? There was a problem with Heroku tools yesterday which may explain the problem.
Solved.
Problems was with active admin and meta_search
see https://github.com/gregbell/active_admin/issues/182
That was a waste of a few days.. heroku support helped me figure that out
remove the faker gem from gem file then try, it may work...
Hi i'm a newbie for developing rails application and i have interest
in using 'spree' for my Ecommerce website.
I'm following this tutorial in spree from this site
http://guides.spreecommerce.com/getting_started.html
I made a fresh install as the tutorial above guided me. I made it to the part '5.1 Starting up Spree' using rails 1.9.3 and mysql
database. Everything was fine until i notice the login bar wasn't
appearing like the tutorial did.
I did some research which led me to this solution in
https://github.com/railsdog/deface/issues/12
what i understand from this article, it seems that the problem comes from a 'bug' from the defacement gem when using ruby 1.9.3 ,
but the problem does not appear in 1.9.2 so i changed my ruby
version into 1.9.2 to try it out.
After i installed ruby 1.9.2 i installed 'spree' gem I repeated the project (using mysql database) from the 'getting started
tutorial' to finish the tutorial.
now at part 4.4.2 where i type 'rake db:create' terminal outputs this
store$ rake db:create
store_test already exists
store_development already exists
When i try generate spree site by 'rails g spree:site' , terminal gives me this error
store rails g spree:site
create config/spree.yml /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/spree_core-0.70.2/lib/generators/spree/site/site_generator.rb:16:in
`block in config_spree_yml': undefined method `version' for
Spree:Module (NoMethodError) from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in
`call' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in
`render' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in
`block (2 levels) in invoke!' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in
`open' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in
`block in invoke!' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `call' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `invoke_with_conflict_check' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:61:in
`invoke!' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions.rb:95:in
`action' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:26:in
`create_file' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/spree_core-0.70.2/lib/generators/spree/site/site_generator.rb:15:in
`config_spree_yml' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in
`run' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in
`invoke_task' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
`block in invoke_all' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
`each' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
`map' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
`invoke_all' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:226:in
`dispatch' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in
`start' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/rails/generators.rb:168:in
`invoke' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/strong textrails/commands/generate.rb:12:in `<top (required)>' from
/Usestrong textrs/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in
`require' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in
`block in require' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in
`block in load_dependency' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:640:in
`new_constants_in' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in
`load_dependency' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in
`require' from
/Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/rails/commands.rb:28:in
`<top (required)>' from script/rails:6:in `require' from
script/rails:6:in `<main>'
I was pretty confuse because i didn't create a database before (but it is showing that it existed). And now i can't even generate
spree site. I researched this problem for days and i haven't found a
matching solution yet. This is what my Gemfile looks like
source 'http://rubygems.org'
gem 'rails', '3.1.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default. group :assets do gem 'sass-rails', '~> 3.1.5.rc.2' gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3' end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# 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', '0.8.2',
:require => false
gem 'spree' , '0.70.2'
end
I'd really appreciate if someone can give me some pointers or solutions to my problems. I'm quite lost right now, it'll sure make
someone happy. (tell me if u need more information about my ruby
environment)
Have you started with a fresh Rails application? Here's what I did (yesterday) using Ruby 1.9.2p290, Rails 3.1.1 on Fedora 16:
Make sure that ImageMagick in installed - the bootstrap script won't work without it.
Run rails new appname --database mysql
cd appname
Add gem, 'spree', '0.70.3' to Gemfile
Run bundle
Configure database.yml
Run rake db: create - ignore any database exists errors
Run rails generate spree:site - ignore any database exists errors
Run rake db:bootstrap
That should be it.
Just realised - you've got "gem 'spree'..." inside the ":test" group. Not good. Don't muck about with the Gemfile - just add the spree gem at the end.
As of today (December 2nd, 2012) the current version of spree which is compatible with ruby 1.9.3 and rails 3.2.9 is spree -v '1.2.2"
http://spreecommerce.com/blog/2012/11
Version 1.3 is set to release in December 2012
I am no expert, but I think you need to change your gemfile to
gem 'spree', '1.2.2'
I'm trying to deploy a Rails3 app to Heroku, but am getting this 'Rake aborted' error when I rake db:create or rake db:migrate to heroku.
db:push does send the schema, indexes and data, but I get an 'Application Error' at the app.heroku url.
I've tried deleting and creating a new Heroku app, but I get the same problem.
Paperclip seems to be the cause. I've checked that paperclip is in the gemfile. I've updated all gems. I tried removing obvious dependencies from the gemfile. But I still get the 'rake aborted' error.
I'd appreciate any ideas or pointers to useful information to help me understand what's going on, and how to fix it.
This is the heroku db:create --trace
rake aborted!
no such file to load -- Paperclip
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/config/application.rb:11
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/app/Rakefile:4
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/ruby1.8.7/bin/rake:19:in `load'
/usr/ruby1.8.7/bin/rake:19
(in /app)
The heroku log file is long, and the only bit that looks relevant is
2011-04-26T02:57:28+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require': no such file to load -- Paperclip (LoadError)
My gem file
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'sqlite3'
gem 'pg', :require => 'pg'
gem 'paperclip', :require => 'paperclip'
gem 'rack-raw-upload'
gem 'rmagick'
gem 'will_paginate', '3.0.pre2'
gem 'devise'
gem 'aws-s3'
gem 'omniauth'
gem 'cancan'
gem 'cells'
group :development do
gem 'annotate-models', '1.0.4'
gem 'nifty-generators'
end
group :test do
gem 'mocha'
end
Everything is working fine in my local Postgres dev environment.
Please let me know if I have missed any important info.
I appreciate any pointers that would help understand the best approach to debugging an issue like this. I'm lost as to where to start!
Thanks
After a lot of searching, the answer to this was in the application.rb file. I had a line "require Paperclip", which i deleted and everything worked fine.