Peer authentication failed - postgresql

At my VPS server, I do:
rake db:migrate RAILS_ENV=production
But, I get this error:
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-core-1.24.0/lib/fog/core/collection.rb:148: warning: circular argument reference - filters
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-1.23.0/lib/fog/rackspace/mock_data.rb:42: warning: duplicated key at line 80 ignored: "name"
/usr/local/rvm/gems/ruby-2.2.1/gems/simple_form-3.0.2/lib/simple_form/inputs/boolean_input.rb:38: warning: circular argument reference - unchecked_value
rake aborted!
PG::ConnectionBad: FATAL: Peer authentication failed for user "myuser"
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:87:in `connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:909:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:in `up'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:785:in `migrate'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
database.yml:
production:
adapter: postgresql
encoding: unicode
database: mydatabase
pool: 5
username: myuser
password: mypassword
What possible reason would this be? although myuser is the owner of mydatabase
How solve this?

Related

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

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.

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!

unable to deploy play 2.1 scala app to heroku

when I try to deploy my play scala 2.1 app to heroku I get the following error:
[info] Wrote /tmp/build_36s2qu6pn5i6k/target/scala-2.10/get2play_2.10-1.0.pom
[info] Packaging /tmp/build_36s2qu6pn5i6k/target/scala-2.10/get2play_2.10-1.0-sources.jar ...
[info] Done packaging.
[info] Generating Scala API documentation for main sources to /tmp/build_36s2qu6pn5i6k/target/scala2.10/api...
/app/slug-compiler/lib/utils.rb:67:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../../tmp/buildpacks/scala/bin/compile /tmp/build_36s2qu6pn5i6k /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=902.47056889534 (Utils::TimeoutError)
from /app/slug-compiler/lib/utils.rb:53:in `loop'
from /app/slug-compiler/lib/utils.rb:53:in `block in spawn'
from /app/slug-compiler/lib/utils.rb:48:in `popen'
from /app/slug-compiler/lib/utils.rb:48:in `spawn'
from /app/slug-compiler/lib/buildpack.rb:37:in `block in compile'
from /app/slug-compiler/lib/buildpack.rb:35:in `fork'
from /app/slug-compiler/lib/buildpack.rb:35:in `compile'
from /app/slug-compiler/lib/slug.rb:526:in `block in run_buildpack'
from /app/slug-compiler/lib/utils.rb:122:in `log'
from /app/slug-compiler/lib/slug.rb:763:in `log'
from /app/slug-compiler/lib/slug.rb:525:in `run_buildpack'
from /app/slug-compiler/lib/slug.rb:132:in `block (2 levels) in compile'
from /app/slug-compiler/lib/utils.rb:103:in `block in timeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /app/slug-compiler/lib/utils.rb:103:in `rescue in timeout'
from /app/slug-compiler/lib/utils.rb:98:in `timeout'
from /app/slug-compiler/lib/slug.rb:119:in `block in compile'
from /app/slug-compiler/lib/utils.rb:122:in `log'
from /app/slug-compiler/lib/slug.rb:763:in `log'
from /app/slug-compiler/lib/slug.rb:118:in `compile'
from /app/slug-compiler/bin/slugc:86:in `block in <main>'
from /app/slug-compiler/lib/slug.rb:534: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:534:in `lock'
from /app/slug-compiler/bin/slugc:67:in `<main>'
! Heroku push rejected, failed to compile Play 2.x - scala app
everything worked till yesterday. there were no big code changes.
has anyone an idea what the problem is and how to solve it?

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.

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