I tried to deploy my Rails application with Capistrano, and got the following error:
NoMethodError: undefined method `to_h' for nil:NilClass
Here is the stack trace, which looks like it may be a Sprockets issue, but I can't figure out why:
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:14:in `configuration_hash'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:40:in `configuration_hash'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:44:in `initialize'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:21:in `new'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:21:in `instance'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-es6-0.9.0/lib/sprockets/es6.rb:34:in `call'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:44:in `load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `yield'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `default'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/utils.rb:183:in `dfs'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/bundle.rb:24:in `call'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/loader.rb:44:in `load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `yield'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `default'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/base.rb:66:in `find_asset'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:142:in `block in find'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:225:in `block in stat_tree'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:209:in `block in stat_directory'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `each'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `stat_directory'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:224:in `stat_tree'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `each'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `each'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:140:in `find'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:168:in `compile'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-3.5.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/paperless_office/shared/bundle/ruby/1.9.1/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
This is my local environment:
OSX 10.11.3
Ruby 2.1.3p242
Rails 4.1.0
Rake 10.3.2
Sprockets-Rails 2.3.3
Capistrano 3.4.0
This is my production environment:
Centos 5
ruby 2.1.3p242 (managed by rbenv)
My currently installed gems are:
bigdecimal (1.2.4)
bundler (1.11.2)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
test-unit (2.1.3.0)
I have been able to run:
gem install bundler
However, if I run:
gem install rails
I get:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Service Unavailable 503 (https://api.rubygems.org/api/v1/dependencies?gems=rack)
Is this is linked to my initial question?
For anyone coming across this, the problem was fixed thanks to the link posted by #DavidK-J which pointed me in the right direction. I needed to update the cap files with the settings for rbenv as follows:
Capfile
require 'capistrano/rbenv'
deploy.rb
set :rbenv_type, :system
set :rbenv_path, '~/.rbenv'
set :rbenv_ruby, "2.1.3"
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all
I then had to update passenger's config with the path to rbenv which in my case was:
~/.rbenv
HTH someone else.
Paul
Related
I cannot install a spree store in my application because of this error I keep getting:
spree install
Would you like to install the default gateways? (Recommended) (yes/no) [yes] y
Would you like to install the default authentication system? (yes/no) [yes] y
Would you like to run the migrations? (yes/no) [yes] y
Would you like to load the seed data? (yes/no) [yes] n
Would you like to load the sample data? (yes/no) [yes] n
gemfile spree
gemfile spree_gateway
gemfile spree_auth_devise
run bundle install from "."
--migrate=true is not a rails project.
here is my gemfile...
source 'https://rubygems.org'
gem 'rails_12factor'
gem 'paperclip'
gem 'cancan'
gem 'devise'
gem 'therubyracer'
gem 'twitter-bootswatch-rails'
gem 'twitter-bootswatch-rails-helpers'
gem 'rails', '4.1.6'
gem 'spree_cmd'
gem 'spree', '2.3.4'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-3-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-3-stable'
then, when i run the other command, rails g spree:install, this is what happens:
rails g spree:install
Would you like to install the default gateways? (Recommended) (yes/no) [yes] y
Would you like to install the default authentication system? (yes/no) [yes] y
Would you like to run the migrations? (yes/no) [yes] y
Would you like to load the seed data? (yes/no) [yes] n
Would you like to load the sample data? (yes/no) [yes] n
gemfile spree
gemfile spree_gateway
gemfile spree_auth_devise
run bundle install from "."
--migrate=true is not a rails project.
/Users/claymccullough/Desktop/cybocars/config/initializers/devise.rb:132:in `block in <top (required)>': undefined method `expire_all_remember_me_on_sign_out=' for Devise:Module (NoMethodError)
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.2.4/lib/devise.rb:288:in `setup'
from /Users/claymccullough/Desktop/cybocars/config/initializers/devise.rb:3:in `<top (required)>'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `load'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `load'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/notifications.rb:161:in `instrument'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/engine.rb:647:in `load_config_initializer'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/engine.rb:611:in `each'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:44:in `each'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/claymccullough/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/railtie.rb:194:in `public_send'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/railtie.rb:194:in `method_missing'
from /Users/claymccullough/Desktop/cybocars/config/environment.rb:5:in `<top (required)>'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:147:in `require_application_and_environment!'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:51:in `generate'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/claymccullough/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
If anyone else who has faced this problem and solved it could help, that would be great. Thanks for your time. Also, I did not have this issue before I downloaded OS X Yosemite.
I had this problem. The way I resolved it was by following Spree's documentation instructions for installation verbatim:
gem install spree
rails _4.2.1_ new my_store
spree install my_store
Originally I was not including '__4.2.1_' in my rails new command
I'm using bundler to handle the gems for multiple projects.
bundler v 1.5.2
Mac OS X
rbenv with ruby 2.0
When I run bundle install for some reason it spits out errors from other Gemfiles that I've run previously, but have nothing to do with the folder and Gemfile I'm bundling.
Any idea what causes this?
MacBook-Pro:test mylo$ bundle install
Using mini_portile (0.5.2)
Using nokogiri (1.6.1)
Using rack (1.5.2)
Using rack-protection (1.5.2)
Using tilt (1.4.1)
Using sinatra (1.4.4)
Using bundler (1.5.2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled
gem is installed. rbenv: version `.DS_Store' is not installed
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/resolver.rb:134:in
`block in resolve': Could not find gem 'dii_eris ( = 2.0.3) ruby',
which is required by gem 'dii_pluto ( = 0) ruby', in any of the
sources. (Bundler::VersionConflict) from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/safe_catch.rb:32:in
`catch' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/safe_catch.rb:32:in
`safe_catch' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/resolver.rb:132:in
`resolve' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:203:in
`resolve' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:133:in
`specs' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/environment.rb:22:in
`specs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:115:in
`gemspecs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:204:in
`block (3 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`block (2 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`each' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`block in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:462:in
`<main '
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:387:in
`rescue in eval_gemspec': There was a NameError while loading
codeproject.gemspec: (Bundler::GemspecError) uninitialized constant
Dii::Gemini from
/Users/mylo/gitcode/libs/codeproject/codeproject.gemspec:7:in `block
in <main ' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:376:in
`eval_gemspec' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:347:in
`block in load_gemspec_uncached' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in
`chdir' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in
`chdir' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:342:in
`load_gemspec_uncached' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:332:in
`load_gemspec' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:51:in
`gemspec' from /Users/mylo/gitcode/libs/codeproject/Gemfile:4:in
`eval_gemfile' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:30:in
`instance_eval' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:30:in
`eval_gemfile' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:9:in
`evaluate' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:26:in
`build' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:95:in
`gemspecs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:204:in
`block (3 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`block (2 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`each' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`block in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:462:in
`<main '
I had a hunch that it probably had to do with rbenv-bundler, as indicated in this issue. But checking gem list rbenv-bundler didn't reveal the vilain. Until I tried brew list | grep rbenv as descrived here.
I simply did brew uninstall rbenv-bundler and all the problems described above seem to be gone! Also the rbenv: version `.DS_Store' is not installed you had in your dump seems to be gone.
I'm on a macbook pro with OSX 10.7.5 installed, I've tried several times to build ember.js following the the steps on the github page, basically running "rake dist" in the cloned repository. But it does not work. Please find below my console output when I run "rake dist". Since I'm not a ruby expert I wonder if someone can point me in some direction since I don't understand the error that is preventing me to build ember.js.
[ alex#io ][ ~/workspace/ember.js ][ master ]
➜ rake dist --trace
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/rake_module.rb:25: warning: redundant nested repeat operator
** Invoke dist (first_time)
** Execute dist
Building Ember...
rake aborted!
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:142:in `exec_runtime'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:27:in `exec'
/Users/alex/.bundler/ruby/1.9.1/uglifier-2f6c31a67d6d/lib/uglifier.rb:137:in `really_compile'
/Users/alex/.bundler/ruby/1.9.1/uglifier-2f6c31a67d6d/lib/uglifier.rb:74:in `compile'
/Users/alex/.bundler/ruby/1.9.1/uglifier-2f6c31a67d6d/lib/uglifier.rb:47:in `compile'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-web-filters-1a6dc173776b/lib/rake-pipeline-web-filters/uglify_filter.rb:62:in `block in generate_output'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-web-filters-1a6dc173776b/lib/rake-pipeline-web-filters/uglify_filter.rb:58:in `each'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-web-filters-1a6dc173776b/lib/rake-pipeline-web-filters/uglify_filter.rb:58:in `generate_output'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/filter.rb:218:in `block (3 levels) in generate_rake_tasks'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/file_wrapper.rb:135:in `create'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/filter.rb:218:in `block (2 levels) in generate_rake_tasks'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:228:in `call'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:228:in `block in execute'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:223:in `each'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:223:in `execute'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/alex/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/dynamic_file_task.rb:154:in `invoke_with_call_chain'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:152:in `invoke'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/dynamic_file_task.rb:60:in `invoke'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline.rb:328:in `block (2 levels) in invoke'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline.rb:328:in `each'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline.rb:328:in `block in invoke'
:10:in `synchronize'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline.rb:321:in `invoke'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/project.rb:126:in `each'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/project.rb:126:in `block in invoke'
:10:in `synchronize'
/Users/alex/.bundler/ruby/1.9.1/rake-pipeline-50b8d77b703c/lib/rake-pipeline/project.rb:112:in `invoke'
/Users/alex/workspace/ember.js/Rakefile:43:in `block in '
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:228:in `call'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:228:in `block in execute'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:223:in `each'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:223:in `execute'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/alex/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/task.rb:152:in `invoke'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:143:in `invoke_task'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:101:in `each'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:101:in `block in top_level'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:110:in `run_with_threads'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:95:in `top_level'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:73:in `block in run'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.6/bin/rake:37:in `'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `load'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
/Users/alex/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `'
Tasks: TOP => /Users/alex/workspace/ember.js/tmp/rake-pipeline-7aa53b2ead15d9e299f5cd1196d85943d735c070/rake-pipeline-3-tmp-7/ember-runtime.min.js
and here is the output when I run bundle install inside the root directory of the repo at the master branch
➜ bundle install
Using rake (0.9.6)
Using colored (1.2)
Using multi_json (1.3.7)
Using execjs (1.4.0)
Using multipart-post (1.1.5)
Using faraday (0.8.4)
Using hashie (1.2.0)
Using nokogiri (1.5.5)
Using httpauth (0.2.0)
Using jwt (0.1.5)
Using rack (1.4.1)
Using oauth2 (0.8.0)
Using github_api (0.8.1)
Using mime-types (1.19)
Using rest-client (1.6.7)
Using github_downloads (0.1.3) from https://github.com/pangratz/github_downloads.git (at master)
Using json (1.7.6)
Using listen (0.6.0)
Using kicker (2.6.1)
Using thor (0.16.0)
Using rake-pipeline (0.8.0) from https://github.com/livingsocial/rake-pipeline.git (at master)
Using rake-pipeline-web-filters (0.6.0) from https://github.com/wycats/rake-pipeline-web-filters.git (at master)
Using uglifier (1.3.0) from https://github.com/lautis/uglifier.git (at master)
Using bundler (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Thanks in advance,
Alex
Do you have nodejs installed?
From docs ...
If you are building under Linux, you will need a JavaScript runtime for minification. You can either install nodejs or gem install therubyracer.
Assume it might be the same for Mac
I got it working:
export RUBYOPT='-E utf-8'
did the trick.
I'm going to close the question.
I am trying to deploy a project to Heroku.
The project has previously been successfully deployed, but now I get the following output when deploying:
[...]
Using rspec-expectations (2.8.0)
Using rspec-mocks (2.8.0)
Using rspec (2.8.0)
Using bundler (1.1.rc.7)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
/app/slug-compiler/lib/utils.rb:62:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp/build_465ucsomkafs /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=580.2929985523224 (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 app
We have pinpointed the line in Gemfile that causes this to be:
gem 'internal-lib', :git => 'https://username:password#github.com/Projectname/internal-lib'
When bundler installs the gem it looks alright:
Fetching https://username:password#github.com/Projectname/internal-lib
In what ways can a successfully bundled gem cause the "Cleaning up the bundler cache" step to timeout?
We have tried to include the gem in other ways, as a raw copy of the repo in vendor/private and as a git submodule in vendor/private but no success.
It seems like it was a problem with Heroku. Today the deploy worked again, without changes from our side...
Trying to run rake cucumber:ok and am getting this error:
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
Then:
Command failed with status (1): [/Users/dev/.rbenv/versions/1.9.2-p290/bin...]
I am pretty new to Rails and Google didn't turn anything up for this error.
EDIT: I've tried adding bundle exec and that makes no difference.
Here's what I got with --trace:
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/rake/task.rb:104:in `run'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/rake/task.rb:193:in `block in define_task'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/dev/.rbenv/versions/1.9.2-p290/bin/rake:19:in `load'
/Users/dev/.rbenv/versions/1.9.2-p290/bin/rake:19:in `<main>'
Tasks: TOP => cucumber:ok
I started having the same problem this evening. It seems to be related to Rack 1.3.4. I fixed it by adding this to my Gemfile:
gem 'rack', '1.3.3'
Then running:
bundle update rack
Incidentally, I tried Bozhidar's suggestion before this, but to no avail.
Rack 1.3.5 is out now, which has fixed this warning.
you should uninstall rake-0.9.2
and install rack 1.6.13
gem uninstall rake
gem install rack 1.6.13
So, I included:
require 'uri/common'; ::URI.send :remove_const, :WFKV_
however the comment which says "it will work in the Gemfile" in fact should read "Must be in the Gemfile."