Spree Error: --migrate=true is not a rails project - installation

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

Related

Error when compiling assets on the production server

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

Why doesn't ruby find the 'dimensions' gem?

I am using Jekyll for quite a while now to generate my blog (source). Today, without having changed anything in the generation process, I got
[...]
jekyll build --config _config_prod.yml
Configuration file: _config_prod.yml
/home/moose/GitHub/MartinThoma.github.io/_plugins/caption_tag.rb:23:in `require': cannot load such file -- dimensions (LoadError)
from /home/moose/GitHub/MartinThoma.github.io/_plugins/caption_tag.rb:23:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `require'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `block (2 levels) in require_plugin_files'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `each'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `block in require_plugin_files'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `each'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `require_plugin_files'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:79:in `setup'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:41:in `initialize'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `new'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `process'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `call'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `block in execute'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `each'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `execute'
from /usr/lib/ruby/vendor_ruby/mercenary/program.rb:42:in `go'
from /usr/lib/ruby/vendor_ruby/mercenary.rb:19:in `program'
from /var/lib/gems/2.1.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
Makefile:35: recipe for target 'deploy' failed
make: *** [deploy] Error 1
I am not a Ruby developer, but I guess the problem is require 'dimensions'? However, when I execute this line in irb it only shows => true.
What is the problem and how can I fix it?
Diagnostic information
$ jekyll --version
jekyll 2.5.3
$ head -1 `which irb`
#!/usr/bin/ruby2.1
$ head -1 `which jekyll`
#!/usr/bin/ruby2.1
Executing RUBY_VERSION in irb gives => "2.1.5".
The problem was fixed by adding gem 'dimensions' to the file Gemfile. It now looks like this:
source "https://rubygems.org"
# see https://github.com/paulrobertlloyd/paulrobertlloyd.com/blob/master/Gemfile
# Guard (automates development tasks)
# Jekyll (generates static files)
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-paginate'
gem 'dimensions'
gem 'rmagick'
end
# Rake (manages build tasks)
gem 'rake'

Gem::ConflictError while running Rspec test cases

This question and answer might be simple however I thought it would be worth sharing.
I cloned the github repository https://github.com/mikel/mail.git and browsing the specs.
I just thought of running the specs inside the application so ran the command "rspec".
Error description
athi#localhost mail (master) $ rspec
Running Specs under Ruby Version 2.1.5
/Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2104:in `raise_if_conflicts': Unable to activate rspec-3.3.0, because rspec-core-3.4.0 conflicts with rspec-core (~> 3.3.0) (Gem::ConflictError)
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1282:in `activate'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:198:in `rescue in try_activate'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems.rb:195:in `try_activate'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in require'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /Users/athi/Documents/apps/github/mail/spec/spec_helper.rb:18:in `<top (required)>'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/athi/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/athi/Documents/apps/github/mail/spec/mail/attachments_list_spec.rb:2:in `<top (required)>'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/configuration.rb:1361:in `load'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/configuration.rb:1359:in `each'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/runner.rb:102:in `setup'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/runner.rb:88:in `run'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/runner.rb:73:in `run'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/lib/rspec/core/runner.rb:41:in `invoke'
from /Users/athi/.rvm/gems/ruby-2.1.5/gems/rspec-core-3.4.0/exe/rspec:4:in `<top (required)>'
from /Users/athi/.rvm/gems/ruby-2.1.5/bin/rspec:23:in `load'
from /Users/athi/.rvm/gems/ruby-2.1.5/bin/rspec:23:in `<main>'
from /Users/athi/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
from /Users/athi/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
After a little search I found that the "bundle" is not initialised for this repository and the Gemfile.lock is missing.
So I just ran
bundle install
and it worked.
It installed the necessary gems and then I was able to run the specs properly.

trying to run command rails server (ruby on rails)

im trying to get started with rails. I have made a rails project and now im trying to start the server but get this.
C:\Users\Home\Documents\Sites\simple_cms>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
from C:/Users/Home/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
my gemfile has gem 'mysql2', '~> 0.3.18'
windows 7
ruby version 2.2.1
rails 4.2.1
mySql server version 5.6.24
Edit:
Couldn't find a solution that worked for me so i installed a different version of rails and it worked out.
Make sure you have installed mysql2 gem using bundle install and that bundle install has returned successful installation.
#James, This issue has been already raised so follow these links and hope this may help you.
1) Error "...cannot load such file -- mysql2/2.0/mysql2 (LoadError)". On Windows XP with Ruby 2.0.0
2) Ruby on Rails - cannot load such file -- mysql2/2.2/mysql2 (LoadError)
3) https://github.com/bundler/bundler/issues/3456
Try to change
gem 'mysql2', '~> 0.3.18'
to
gem 'mysql2', '~> 0.3.11'
I think that maximum compatible version with Windows is 0.3.11. Then run again bundle install

Capistrano - undefined method `map'

I am using capistrano through Magentify. I am using RVM as a regular user on archlinux. I have it using Ruby 2.0.0 and I ran gem install magentify in a gemset I defined for this purpose. It installed Capistrano 3.0.1 and a about 9 other gems. When I set the recipe, I tried
cap -T
and it writes
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymikeandtheboys/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
I also tried cap deploy with the same result (not sure what I expected.) How do I get started trying to fix this?
Edit: ran --trace with command cap -T:
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:304:in `set_arg_names'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:29:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:360:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:32:in `task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:196:in `in_namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:104:in `namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:7:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `<top (required)>'
/home/dirtymike/public_html/project/Capfile:3:in `load'
/home/dirtymike/public_html/project/Capfile:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `<main>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
EDIT
This is fixed in version 0.0.7 of the Gem. I submitted a patch and it now forces to Capistrano 2.X, which is the only compatible version. The original answer was wrong, the problem was not with Rake.
Original Answer
It seems that the problem is with Rake and not with Capistrano. You may need to, either use an older version of rake (possibly 0.9.6), or update the Magentify gem to work with rake 10. Maybe you can open an issue on that repo.
EDIT
Confirmed: It works with rake 0.9.6.
You can add this Gemfile to your project:
source 'http://rubygems.org'
gem 'rake', '~> 0.9'
gem 'magentify'
and then running it like bundle exec cap -T

Resources