Rake - Don't know how to build task 'build' - rake

Apologies for a vague question. I haven't used Rake before and am trying to figure it out.
I'm trying to run tests with rake but I get this stack trace when I do.
rake test:all --trace
** Invoke test:all (first_time)
rake aborted!
Don't know how to build task 'build'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task_manager.rb:62:in `[]'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:57:in `lookup_prerequisite'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:53:in `block in prerequisite_tasks'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:53:in `map'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:53:in `prerequisite_tasks'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/Library/Ruby/Gems/2.3.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/usr/bin/rake:22:in `load'
/usr/bin/rake:22:in `<main>'
Tasks: TOP => test:all
What's the issue here? Is it likely something like a missing dependency?

rake api is the command I required.

Related

Capistrano complains there are too few arguments but it doesn't say what it's referring to

I've been bug solving all morning but I've run into something I'm unable to solve. Capistrano is throwing this message:
cap aborted!
ArgumentError: wrong number of arguments (0 for 1+)
/Users/alexander/.rvm/gems/ruby-2.2.4/gems/capistrano-3.4.0/lib/capistrano/dsl.rb:14:in `invoke'
/Users/alexander/.rvm/gems/ruby-2.2.4/gems/capistrano-3.4.0/lib/capistrano/dsl/task_enhancements.rb:14:in `block in after'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/alexander/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/alexander/.rvm/gems/ruby-2.2.4/gems/capistrano-3.4.0/lib/capistrano/application.rb:15:in `run'
/Users/alexander/.rvm/gems/ruby-2.2.4/gems/capistrano-3.4.0/bin/cap:3:in `<top (required)>'
/Users/alexander/.rvm/gems/ruby-2.2.2/bin/cap:23:in `load'
/Users/alexander/.rvm/gems/ruby-2.2.2/bin/cap:23:in `<main>'
/Users/alexander/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/Users/alexander/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deploy
The deploy has failed with an error: wrong number of arguments (0 for 1+)
** Invoke deploy:failed (first_time)
** Execute deploy:failed
Any idea what it's even referring to?
You can see all of the output of running cap production deploy here.
Deploy.rb, Production.rb, and Capfile are here.
I had both Capistrano 2 and 3 installed on my machine. Uninstalling both of those gems then installing only the version I needed allowed a successful deploy!

Rails migration error with thumbs_up gem

I am using the thumbs_up gem to create a voting system. I am using PostgreSQL. When I run:
rails generate thumbs_up
I get the following error:
/usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thumbs_up-0.6.7/lib/generators/thumbs_up/thumbs_up_generator.rb:21:in `create_migration': wrong number of arguments (3 for 0) (ArgumentError)
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/railties-4.0.4/lib/rails/generators/migration.rb:65:in `migration_template'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thumbs_up-0.6.7/lib/generators/thumbs_up/thumbs_up_generator.rb:22:in `create_migration'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/railties-4.0.4/lib/rails/generators.rb:156:in `invoke'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/railties-4.0.4/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p247#firehose/gems/railties-4.0.4/lib/rails/commands.rb:48:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
How do I fix this?
This is a bug in thumbs_up.
Check this issue on github: https://github.com/bouchard/thumbs_up/issues/96
I stumbled across the same error and fixed it with the help of the link above.
Apparently all you have to do is change a file in the thumbs_up gem (you will find the location of that gem in the error itself).
In file
[path to gem]/lib/generators/thumbs_up/thumbs_up_generator.rb
replace
def create_migration
migration_template 'migration.rb', File.join('db', 'migrate', 'thumbs_up_migration.rb')
end
with
def create_thumbs_up_migration
migration_template 'migration.rb', File.join('db', 'migrate', 'thumbs_up_migration.rb')
end
in your Gemfile require the gem this way:
gem 'thumbs_up', git: 'https://github.com/bouchard/thumbs_up.git', ref: 'f499a7c803c0a9fdcefe4275f2f0a10ca7964508'
then run
rails generate thumbs_up
This should work. Worked for me - hope this helps....

Section 5.4 Rails Tutorial

I'm tearing my hair out. I'm doing the Rails Tutorial by Hartl, and everything has been working until section 5.4.
It seems to be that I generated a new controller, then generated the integration_test user_pages, then the whole thing went haywire. I can't for the life of me work out what I've done wrong or where to start. I even tried destroying both and the same error comes out. Please help!
My Code
Jordan-Poulton:Projects academy$ cd first_app/
Jordan-Poulton:first_app academy$ subl .
Jordan-Poulton:first_app academy$ rails generate controller Users new --no-test-framework
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
create app/controllers/users_controller.rb
route get "users/new"
invoke erb
create app/views/users
create app/views/users/new.html.erb
invoke helper
create app/helpers/users_helper.rb
invoke assets
invoke coffee
identical app/assets/javascripts/users.js.coffee
invoke scss
create app/assets/stylesheets/users.css.scss
Jordan-Poulton:first_app academy$ rails generate integration_test user_pages
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
invoke rspec
create spec/requests/user_pages_spec.rb
Jordan-Poulton:first_app academy$ rails s
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr in PATH, mode 040777
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:185:in `default_controller_and_action': missing :action (ArgumentError)
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:78:in `normalize_options!'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:61:in `initialize'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1304:in `new'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1304:in `add_route'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1284:in `decomposed_match'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1270:in `block in match'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1270:in `each'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:1270:in `match'
from /Users/academy/Projects/first_app/config/routes.rb:6:in `block in <top (required)>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /Users/academy/Projects/first_app/config/routes.rb:1:in `<top (required)>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/file_update_checker.rb:78:in `call'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.12/lib/active_support/file_update_checker.rb:78:in `execute'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/academy/Projects/first_app/config/environment.rb:5:in `<top (required)>'
from /Users/academy/Projects/first_app/config.ru:3:in `require'
from /Users/academy/Projects/first_app/config.ru:3:in `block in <main>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/academy/Projects/first_app/config.ru:in `new'
from /Users/academy/Projects/first_app/config.ru:in `<main>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /Users/academy/.rvm/gems/ruby-1.9.3-p385/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Please check your controller. Content should be this
#app/controllers/users_controller.rb
class UsersController < ApplicationController
def new
end
end
and your routes.rb
#config/routes.rb
FirstApp::Application.routes.draw do
get "users/new"
root to: 'pages#home'
Run the following commands before rails s, just in case:
bundle install
bundle update
rake db:migrate
Sometimes a rake db:reset could help, but this will destroy and rebuild your database in your development environment.

Cap deploy error find_file_in_path: no such file foud

I'm using capyfony + symfony2.
cap deploy
/var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:183:in `find_file_in_load_path': no such file to load -- (LoadError)
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:171:in `load_from_file'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from Capfile:3:in `load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:93:in `load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `each'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:31:in `execute!'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:14:in `execute'
from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/bin/cap:4:in `<top (required)>'
from /usr/local/bin/cap:19:in `load'
from /usr/local/bin/cap:19:in `<main>'
I got the same issue. By investigating, I tried to put:
puts Gem.find_files('symfony2.rb')
In my Capfile file, as mentioned on https://github.com/everzet/capifony/issues/190. Yet, it returns nothing. I think I miss this file. How can I get it?
Edit :
After more investigating, I finally find the solution.
I used a Capfile for Capifony 2.1.16. It seems the new version of Capifony (2.2) requires some changes in the Capfile file. With the following it should work:
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) }
load Gem.find_files('capifony_symfony2.rb').last.to_s
load 'app/config/deploy'

Rake DEPRECATION WARNING

I'm having problems creating a db test. When I use ./script/sync_testenv.sh I get this error:
draco351#draco351-virtual-machine:~/gamersmafia$ sudo ./script/sync_testenv.sh
(in /home/draco351/gamersmafia)
DEPRECATION WARNING: Rake tasks in vendor/plugins/jrails/tasks, vendor/plugins/paperclip/tasks, vendor/plugins/rails_rcov/tasks, and vendor/plugins/restful_authentication/tasks are deprecated. Use lib/tasks instead. (called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/tasks/rails.rb:10)
** Invoke db:test:clone_structure (first_time)
** Execute db:test:clone_structure
** Invoke db:test:create (first_time)
** Execute db:test:create
** Invoke db:test:purge (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant WWW
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:469:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:106:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:118:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/blackbook-1.0.4/lib/blackbook/importer/page_scraper.rb:7
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/blackbook-1.0.4/lib/blackbook/importer/gmail.rb:1
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/blackbook-1.0.4/lib/blackbook.rb:68
/usr/lib/ruby/gems/1.8/gems/blackbook-1.0.4/lib/blackbook.rb:68:in `each'
/usr/lib/ruby/gems/1.8/gems/blackbook-1.0.4/lib/blackbook.rb:68
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:58:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:58:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/home/draco351/gamersmafia/config/environment.rb:38
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/initializer.rb:111:in `run'
/home/draco351/gamersmafia/config/environment.rb:9
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.10/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/draco351/gamersmafia/lib/tasks/db.rake:24
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/draco351/gamersmafia/lib/tasks/db.rake:44
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
This is the project:
https://github.com/Draco351/gamersmafia
And I have the next gems:
*** LOCAL GEMS ***
aasm (2.2.0)
abstract (1.0.0)
actionmailer (3.0.9, 2.3.10)
actionpack (2.3.10)
activemodel (3.0.9)
activerecord (2.3.10)
activeresource (2.3.10)
activesupport (2.3.10)
ai4r (1.9)
arel (2.0.10)
blackbook (1.0.4)
builder (2.1.2)
bundler (1.0.15)
capistrano (2.6.0)
ci_reporter (1.6.5)
classifier (1.3.3)
curb (0.7.15)
daemon_controller (0.2.6)
erubis (2.6.6)
fast-stemmer (1.0.0)
fastercsv (1.5.4)
fastthread (1.0.7)
feedbag (0.6)
feedzirra (0.0.20)
file-tail (1.0.6)
geoip (1.1.1)
gruff (0.3.6)
haml (3.1.2)
highline (1.6.2)
hoe (2.10.0)
hpricot (0.8.4)
i18n (0.5.0)
json_pure (1.5.3)
loofah (1.0.0)
mail (2.2.19)
mechanize (2.0.1)
mime-types (1.16)
net-http-digest_auth (1.1.1)
net-http-persistent (1.8)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
nokogiri (1.5.0)
passenger (3.0.2)
pg (0.11.0)
polyglot (0.3.1)
rack (1.1.2)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.10)
railties (3.0.9)
rake (0.8.7)
rcov (0.9.9)
rdoc (3.8)
rmagick (2.13.1)
rubyforge (2.0.4)
rubygems-update (1.6.2)
rubystats (0.2.3)
sax-machine (0.0.16)
scrubyt (0.4.06)
spruz (0.2.10)
stemmer (1.0.1)
thor (0.14.6)
tidy (1.1.2)
treetop (1.4.9)
tzinfo (0.3.29)
webrobots (0.0.10)
I have tried a lot of things but I can't find any solution. There are no problems when I create a new database with these commands:
createdb gamersmafia
psql -f db/create.sql gamersmafia
But the problems, as I said, arise when I want to execute a db test with ./script/sync_testenv.sh.
when use Bundler, the documentation suggests:
remove any "config.gem"
run rake tasks with bundler initialization, like this bundle exec rake db:test:clone_structure