SSHKit::Runner::ExecuteError: Exception while executing on host - ruby-on-rails-4

Trying to deploy a rails application to digital ocean following this tutorial:
https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma
but keep getting an error:
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host xxx.xx.xx.xx: connection closed by remote host. Need help have been at this for the past four hours
>> cap production deploy:initial --trace
1 ↵
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke deploy:set_rails_env (first_time)
** Execute deploy:set_rails_env
** Invoke deploy:set_rails_env
** Invoke rvm:hook (first_time)
** Execute rvm:hook
DEBUG [5976e045] Running /usr/bin/env [ -d ~/.rvm ] on xxx.xx.xx.xxx
DEBUG [5976e045] Command: [ -d ~/.rvm ]
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host xxx.xx.xx.xx: connection closed by remote host
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Net::SSH::Disconnect: connection closed by remote host
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:50:in `rescue in block (2 levels) in negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:46:in `block (2 levels) in negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `loop'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `block in negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `loop'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:32:in `initialize'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `new'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `block in initialize'
/Users/andela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
/Users/andela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:125:in `timeout'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `initialize'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:187:in `with_ssh'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:137:in `block in _execute'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:62:in `test'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (required)>'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
EOFError: end of file reached
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:47:in `readpartial'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:47:in `block (2 levels) in negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `loop'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `block in negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `loop'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `negotiate!'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:32:in `initialize'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `new'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `block in initialize'
/Users/andela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
/Users/andela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:125:in `timeout'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `initialize'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:187:in `with_ssh'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:137:in `block in _execute'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:62:in `test'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (required)>'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/andela/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook

I had the same issue recently, I think there is a mistake in the tutorial.
Here's what I changed.
set :ssh_options, { forward_agent: true, user: fetch(:user), keys: %w(~/.ssh/id_rsa) }
I removed .pub from the id_rsa. And now I can deploy using the tutorial from Digital ocean.

I guess you have to generate ssh-key from server and copy key to your GitHub.

Related

Rails giving undefined method `workers' for main:Object (NoMethodError)

I am trying to setup puma on heroku for a rails app. I'm following Heroku's guide on how to do it, but the config file they give doesn't seem to work, and I can't figure out why. When I don't use any config file, it runs fine, but I want to be able to specify the number of workers and threads it uses.
When I try to run the server, I get the following error:
C:/Users/Ephraim/Documents/lis/rails_app/config/initializers/puma.rb:1:in `<top (required)>': undefined method `workers' for main:Object (NoMethodError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from C:/Users/Ephraim/Documents/lis/rails_app/config/environment.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:3:in `block in <main>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:in `new'
from C:/Users/Ephraim/Documents/lis/rails_app/config.ru:in `<main>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from C:/Users/Ephraim/Documents/lis/rails_app/bin/rails:8:in `require'
from C:/Users/Ephraim/Documents/lis/rails_app/bin/rails:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Here is the puma.rb initializer I'm using:
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
What would cause this to happen? And how can I fix it?
Referencing an answer from here: puma initializer does not work with rails 4.2
Put the puma.rb file in config/ not config/initializers/
you need to use foreman https://github.com/ddollar/foreman to run the Procfile. That is how heroku will spool up the app. once installed foreman start should do the trick. this just fooled me for a bit and I ran across your question.

Rails 4 - local assets precompile error

In development (rails 4.2 app), we are doing local assets precompile with following command:
$ RAILS_ENV=production bundle exec rake assets:clean assets:precompile RAILS_RELATIVE_URL_ROOT=/tj --trace
** Invoke assets:clean (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:clean
** Invoke assets:precompile (first_time)
** Invoke assets:environment
** Execute assets:precompile
rake aborted!
Sass::SyntaxError: Invalid CSS after "...ontent}*/ url(C": expected comma, was ":/Program Files..."
(sass):66
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:1162:in `expected'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/lexer.rb:221:in `expected!'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:463:in `block in arglist'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:460:in `loop'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:460:in `arglist'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:445:in `fn_arglist'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:407:in `funcall'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:387:in `ident'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:246:in `unary_not'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:246:in `unary_div'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:246:in `unary_minus'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:246:in `unary_plus'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `times_div_or_mod'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `plus_or_minus'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `relational'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `eq_or_neq'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `and_expr'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:227:in `or_expr'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:364:in `space'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:345:in `interpolation'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:293:in `expr'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:571:in `assert_expr'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/script/parser.rb:62:in `parse'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:1024:in `sass_script'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:877:in `value!'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:750:in `block in try_declaration'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:1138:in `call'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:1138:in `rethrow'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:763:in `try_declaration'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:693:in `declaration_or_ruleset'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:658:in `block_child'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:650:in `block_contents'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:639:in `block'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:632:in `ruleset'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:657:in `block_child'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:650:in `block_contents'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:117:in `stylesheet'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/scss/parser.rb:42:in `parse'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/engine.rb:393:in `_to_tree'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sass-3.4.14/lib/sass/engine.rb:268:in `render'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:48:in `call'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/sass_compressor.rb:28:in `call'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:70:in `find_all_linked_assets'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:138:in `block in find'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:226:in `block in stat_tree'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:204:in `stat_directory'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/path_utils.rb:222:in `stat_tree'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/legacy.rb:104:in `logical_paths'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:136:in `find'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/sprockets/manifest.rb:162:in `compile'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-3.2.0/lib/rake/sprocketstask.rb:147:in `with_logger'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.3.1/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
c:/Ruby200/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
c:/Ruby200/bin/rake:23:in `load'
c:/Ruby200/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile
The error is caused in parser.rb in sass. We don't quite understand what the error means. We tried to deploy on production server and the above assets precompile command ran successfully without any error. Can someone help us to understand the error and/or fix?
Make sure your css files syntax is correct and properly indented.
Or you can uninstall your sass gem from gem file... but this is not a good solution..
try to correct your css syntax..
Check Line 66 of your SASS file.
Sass::SyntaxError: Invalid CSS after "...ontent}*/ url(C": expected comma, was
":/Program Files..."(sass):66
Looks like an invalid CSS error. I'm guessing you're trying to link to an external file? You'll have to check the paths.
Probably can't use 'C:/Program Files...', instead change it to a relative path in relation to your files i.e
url(../../external_directory/image.png)
After rolling back version of sprockets' from3.2.0to2.12.3, the error disappeared. The error seems to be caused by incompatible version ofsprockets` which does the assets precompile for Rails.
The sass processor (located in the sass gem) is throwing a syntax error when encountering the following code:
ontent}*/ url(C:/Program
which code is generated by the asset pipeline when precompiling one of your local gem assets (most likely the jquery-ui-rails gem, file jquery-ui-rails-x.x.x\app\assets\javascripts\jquery-ui\theme.css.erb, the following line):
background: #ffffff/*{bgColorContent}*/ url(<%= image_path("jquery-ui/ui-bg_flat_75_ffffff_40x100.png") %>)
If you need to spot the exact error location you could temporarily comment the following line:
was = was[0...15] + "..." if was.size > 18
in the saas gem, sass-x.x.x\lib\sass\scss\parser.rb file,
def self.expected(scanner, expected, line) method.
The image_path helper method is not using the correct path to the asset, due to an incorrect value in the config.relative_url_root (relative_url_root seems to have been deprecated, but still used by image_path).
http://apidock.com/rails/ActionView/Helpers/AssetUrlHelper/asset_path
Other gems using the Rails.application.config.action_controller.relative_url_root (like ckeditor_rails) are generating the same issues when precompiling.
The problem is arising when running precompile task (or rails console) with RAILS_RELATIVE_URL_ROOT parameter.
Run
RAILS_RELATIVE_URL_ROOT /yourapprelativeurl rails c
and you will see the wrong path with:
p Rails.application.config.action_controller.relative_url_root
One workaround is to set in application.rb:
config.action_controller.relative_url_root = "" #or "yourapprelativeurl"
This will precompile the gems assets, but it might have other unexpected results also.

redmine error with RMagic

Hello now i am install redmine but when i try migrate my database there is a error :
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
there is stacktrce :
root#server:/opt/redmine/redmine-3.0# bundle exec rake db:migrate
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
rake aborted!
ActiveRecord::AdapterNotSpecified: 'development' database is not configured. Available: ["production"]
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:211:in `resolve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
/opt/redmine/redmine-3.0/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:12:in `eval'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:2:in `each'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/opt/redmine/redmine-3.0/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
While performing bundler actions like the above, you have to always specify environment, unless it's added to your system or shell's environment vars, like ~/.bashrc on linux or environment variables under windows, so in your command, you should add RAILS_ENV=production, and your command would look like this:
bundle exec rake db:migrate RAILS_ENV=production

capistrano 3, rails 4, thin server strange exception

I'm developing a Rails 4 app, I've setup my server to run thin and I'm trying to setup capistrano 3 for deployment. I'm developing on windows and deploying on linux.
Currently if fails on this line:
[f98408e4] Command: bundle exec thin restart -O -C config/thin/production.yml
With a very strange exception. The funny thing is that when I ssh to the server, navigate to the current release dir and execute that command manually it runs correctly. Maybe you'll see something I don't:
cap aborted!
bundle exec thin restart -O -C config/thin/production.yml stdout: Nothing written
bundle exec thin restart -O -C config/thin/production.yml stderr: Nothing written
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/command.rb:94:in `exit_status='
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:125:in `block (4 levels) in _execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:561:in `channel_request'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:205:in `process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:269:in `wait'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:147:in `block (2 levels) in _execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:514:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:205:in `process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:149:in `block in _execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:106:in `tap'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:106:in `_execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:54:in `execute'
config/deploy.rb:23:in `block (4 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/abstract.rb:81:in `within'
config/deploy.rb:22:in `block (3 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:42:in `instance_exec'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:42:in `run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/runners/sequential.rb:9:in `block in execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/runners/sequential.rb:8:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/runners/sequential.rb:8:in `execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/coordinator.rb:21:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sshkit-1.1.0/lib/sshkit/dsl.rb:8:in `on'
config/deploy.rb:21:in `block (2 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
C:/Ruby200/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/dsl.rb:14:in `invoke'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/tasks/deploy.rake:18:in `block (2 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
C:/Ruby200/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/dsl.rb:14:in `invoke'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:64:in `block (2 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:63:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:63:in `block in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
C:/Ruby200/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/capistrano-3.0.0/bin/cap:3:in `<top (required)>'
C:/Ruby200/bin/cap:23:in `load'
C:/Ruby200/bin/cap:23:in `<main>'
Tasks: TOP => deploy:restart
My deploy.rb task about the restart looks like this:
set :default_env, { rvm_bin_path: '~/.rvm/bin' }
set :rails_env, "production"
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute "bundle exec thin restart -O -C config/thin/production.yml"
end
end
end
end
The correct syntax is:
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute :bundle, "exec thin restart -O -C config/thin/production.yml"
end
end
end
before :restart, 'rvm:hook'
end
With a very strange exception. The funny thing is that when I ssh to the server, navigate to the current release dir and execute that command manually it runs correctly. Maybe you'll see something I don't:
http://www.capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/
I'd try working through some of the suggestions to debug this listed there.

Redmine Digest version 2.2.2.stable

I have installed https://github.com/drewkeller/redmine_digest plugin but for the life of me cant set up a cron to run it daily .
Can anyone help a poor boy out ?
root#ip-10-202-39-172:/home/bitnami/apps/redmine/htdocs/bin# rake redmine:send_digest start=1 days=1 project=myproject Rails.env="productio" --trace
(in /opt/bitnami/apps/redmine/htdocs)
** Invoke redmine:send_digest (first_time)
** Execute redmine:send_digest
rake aborted!
string not matched
/opt/bitnami/apps/redmine/htdocs/plugins/redmine_digest/lib/tasks/digest.rake:47:in `[]='
/opt/bitnami/apps/redmine/htdocs/plugins/redmine_digest/lib/tasks/digest.rake:47:in `block (2 levels) in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/opt/bitnami/ruby/bin/rake:23:in `load'
/opt/bitnami/ruby/bin/rake:23:in `<main>'
Tasks: TOP => redmine:send_digest
root#ip-10-202-39-172:/home/bitnami/apps/redmine/htdocs/bin#
root#ip-10-202-39-172:/home/bitnami/apps/redmine/htdocs/bin# rake redmine:send_digest start=1 days=1 project=SSO Rails.env="productio" --trace
(in /opt/bitnami/apps/redmine/htdocs)
** Invoke redmine:send_digest (first_time)
** Execute redmine:send_digest
rake aborted!
string not matched
/opt/bitnami/apps/redmine/htdocs/plugins/redmine_digest/lib/tasks/digest.rake:47:in `[]='
/opt/bitnami/apps/redmine/htdocs/plugins/redmine_digest/lib/tasks/digest.rake:47:in `block (2 levels) in <top (required)>'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/opt/bitnami/ruby/bin/rake:23:in `load'
/opt/bitnami/ruby/bin/rake:23:in `<main>'
Tasks: TOP => redmine:send_digest
root#ip-10-202-39-172:/home/bitnami/apps/redmine/htdocs/bin#
Redmine 2.2.2.stable
Default administrator account changed
Attachments directory writable
Plugin assets directory writable
RMagick available (optional)
Environment:
Redmine version 2.2.2.stable
Ruby version 1.9.3 (x86_64-linux)
Rails version 3.2.11
Environment production
Database adapter Mysql2
Redmine plugins:
openid_fix 0.1.0
redmine_digest 0.2.0
redmine_googlesss 0.0.2
Some other people have reported issues with line 47 in the rake.digest file. You could try the same workaround: https://github.com/drewkeller/redmine_digest/issues/29
Also see https://github.com/drewkeller/redmine_digest/issues/36. Looks like you crossposted your question.