Getting Exception in deploying on server , How to resolve this? - ruby-on-rails

I am using capistrano to deploy on ubuntu server
Brief Response :
while executing as ubuntu#planhop.net: invalid encoding
Logs attached below
Here is detailed response:
** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rvm:hook (first_time)
** Execute rvm:hook
cap aborted!
And:
SSHKit::Runner::ExecuteError: Exception while executing as ubuntu#planhop.net: invalid encoding
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
OpenSSL::PKey::EC::Point::Error: invalid encoding
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/openssl.rb:160:in `initialize'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/openssl.rb:160:in `new'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/openssl.rb:160:in `read_keyblob'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/buffer.rb:289:in `read_keyblob'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/buffer.rb:248:in `read_key'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:108:in `parse_key'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:75:in `parse_line'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:62:in `block (3 levels) in parse_file'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:60:in `each_line'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:60:in `block (2 levels) in parse_file'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:58:in `open'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:58:in `block in parse_file'
/Users/shubham.gupta/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/mutex_m.rb:74:in `synchronize'
/Users/shubham.gupta/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/mutex_m.rb:74:in `mu_synchronize'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:47:in `parse_file'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:18:in `keys_for'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:122:in `block in search_for'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:121:in `map'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh/known_hosts.rb:121:in `search_for'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:96:in `host_keys'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/algorithms.rb:230:in `prepare_preferred_algorithms!'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/algorithms.rb:119:in `initialize'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:86:in `new'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:86:in `initialize'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh.rb:237:in `new'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/net-ssh-4.2.0/lib/net/ssh.rb:237:in `start'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/connection_pool.rb:59:in `call'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/connection_pool.rb:59:in `with'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh.rb:176:in `with_ssh'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/netssh.rb:129:in `execute_command'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `tap'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:55:in `test'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in '
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/shubham.gupta/.rvm/gems/ruby-2.3.1#rails5/gems/sshkit-1.15.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook

Related

rake assets precompile fails on development on windows

For some reason bin read cannot read the an image file form the standard assets directory and is failing with the following message:
C:\Users\username\Documents\project>bundle exec rake assets:precompile
RAILS_ENV=development --trace
DL is deprecated, please use Fiddle
DL is deprecated, please use Fiddle
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
I, [2015-08-20T16:43:52.031167 #2664] INFO -- : Writing C:/Users/username/Documents/project/public/assets/xxx-5e3812eb433519f2816f938f5c3512a8a272644bd73273a3680ceb6f625b701a.png
rake aborted!
Errno::EINVAL: Invalid argument # rb_sysopen - C:/Users/username/Documents/project/C:/Users/username/Documents/project/app/assets/images/xxx.png
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:99:in `binread'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:99:in `source'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:166:in `block in write_to'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:274:in `block in atomic_write'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:273:in `open'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:273:in `atomic_write'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:165:in `write_to'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:186:in `block in compile'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:139:in `block (2 levels) in find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/base.rb:76:in `find_all_linked_assets'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:138:in `block in find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:204:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:204:in `stat_directory'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:222:in `stat_tree'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:105:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:104:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:104:in `logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:136:in `find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:162:in `compile'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/rake/sprocketstask.rb:147:in `with_logger'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in`<top (required)>'
C:/RailsInstaller/Ruby2.1.0/bin/rake:23:in `load'
C:/RailsInstaller/Ruby2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile
I found the solution: it turns out that the internal asset cache in sprockets gem somehow got corrupted file names and as a result the link to the actual image file was causing an exception. Use the following application config setting to flush the cache and overcome this: # Version of your assets, change this if you want to expire all your assets config.assets.version = 'v.2'

Rails app connection with advantage database

I'm trying to connect a Rails app 3.2.13 with an advantage database. I keep taking this error when I run rake db:create.
Any suggestions what I could do to fix that?
Thank you!
C:\Users\Droste\rails_proj\lo_app>rake db:create --trace
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:create
rake aborted!
LoadError: Could not load ACE library
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-advantage-adapter-0.1.1/lib/act
ive_record/connection_adapters/advantage_adapter.rb:34:in `initialize'
C:/Ruby193/lib/ruby/1.9.1/singleton.rb:141:in `new'
C:/Ruby193/lib/ruby/1.9.1/singleton.rb:141:in `block in instance'
<internal:prelude>:10:in `synchronize'
C:/Ruby193/lib/ruby/1.9.1/singleton.rb:139:in `instance'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-advantage-adapter-0.1.1/lib/act
ive_record/connection_adapters/advantage_adapter.rb:60:in `advantage_connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:315:in `new_connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:242:in `loop'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:242:in `block in checkout'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:239:in `checkout'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:102:in `block in connection'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:101:in `connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connec
tion_adapters/abstract/connection_specification.rb:145:in `connection'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railti
es/databases.rake:102:in `create_database'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railti
es/databases.rake:62:in `block (3 levels) in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railti
es/databases.rake:62:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railti
es/databases.rake:62:in `block (2 levels) in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:240:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:240:in `block i
n execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:235:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:235:in `execute
'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:179:in `block i
n invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:172:in `invoke_
with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/task.rb:165:in `invoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:150:in `
invoke_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:106:in `
block (2 levels) in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:106:in `
each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:106:in `
block in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:115:in `
run_with_threads'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:100:in `
top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:78:in `b
lock in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:176:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/lib/rake/application.rb:75:in `r
un'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.1/bin/rake:33:in `<top (required)>
'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'
Tasks: TOP => db:create
I had two .dll files from an older installation. I removed those and the connection looks ok.

rake db:seed not working in dev - pg is running but the connection is being refused

I'm trying to follow along on this tutorial and can't get past the setup of pg.
https://shellycloud.com/blog/2013/10/adding-search-and-autocomplete-to-a-rails-app-with-elasticsearch
I set up pg on my computer using the postgres app, and I installed it successfully in my app using bundle install, but whenever I run rake db:seed I get the error below. pg is running on port 5432, I've tried uninstalling and installing again. rails server runs fine, and psql is working in the terminal.
I have been searching for hours and can't find anything that can explain what the issue is - most answers are to do with sunspot solr which I'm not using. I have already increased my system's shared memory as advised in the postgres app documentation:
sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216
I added the following to my development config as another answer mentioned this as a potential solution:
config.action_mailer.perform_deliveries = false
Any help would be very much appreciated!
This is the error I get when I run rake db:seed
michaels-air:bookstore_search michaeltaylor$ rake db:seed --trace
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
rake aborted!
Connection refused - connect(2)
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `initialize'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `open'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:877:in `connect'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:851:in `start'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/http/client.rb:19:in `post'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/index.rb:146:in `store'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/search.rb:148:in `block in update_index'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__4090249372457318285__update_elasticsearch_index__callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/search.rb:144:in `update_index'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/callbacks.rb:21:in `block in included'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:386:in `_run__4090249372457318285__save__callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/persistence.rb:106:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/validations.rb:51:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/attribute_methods/dirty.rb:32:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:270:in `block (2 levels) in save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:209:in `transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:270:in `block in save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:281:in `rollback_active_record_state!'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:269:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/persistence.rb:37:in `create'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:19:in `block in <top (required)>'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:18:in `each'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:18:in `<top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.0/lib/rails/engine.rb:540:in `load_seed'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/tasks/database_tasks.rb:153:in `load_seed'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:181:in `block (2 levels) in <top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `<main>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:seed
This is my config yml
development:
adapter: postgresql
encoding: unicode
database: bookstore_development
pool: 5
username: michaeltaylor
password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
host: localhost
This is what I get if I try and run rake db:setup
michaels-air:bookstore_search michaeltaylor$ rake db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
bookstore_development already exists
bookstore_test already exists
** Invoke environment (first_time)
** Execute environment
** Execute db:schema:load_if_ruby
** Invoke db:schema:load (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:load
-- enable_extension("plpgsql")
-> 0.0194s
-- create_table("authors", {:force=>true})
-> 0.0214s
-- create_table("authors_books", {:force=>true})
-> 0.0075s
-- create_table("books", {:force=>true})
-> 0.0123s
-- create_table("books_subjects", {:force=>true})
-> 0.0082s
-- create_table("subjects", {:force=>true})
-> 0.0092s
-- initialize_schema_migrations_table()
-> 0.0029s
** Invoke db:structure:load_if_sql (first_time)
** Invoke db:create
** Invoke environment
** Execute db:structure:load_if_sql
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment
** Execute db:abort_if_pending_migrations
rake aborted!
Connection refused - connect(2)
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `initialize'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `open'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:877:in `connect'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/net/http.rb:851:in `start'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/http/client.rb:19:in `post'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/index.rb:146:in `store'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/search.rb:148:in `block in update_index'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__1365093858615832810__update_elasticsearch_index__callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/search.rb:144:in `update_index'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/tire-0.6.0/lib/tire/model/callbacks.rb:21:in `block in included'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:386:in `_run__1365093858615832810__save__callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/persistence.rb:106:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/validations.rb:51:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/attribute_methods/dirty.rb:32:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:270:in `block (2 levels) in save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:209:in `transaction'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:270:in `block in save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:281:in `rollback_active_record_state!'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/transactions.rb:269:in `save'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/persistence.rb:37:in `create'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:19:in `block in <top (required)>'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:18:in `each'
/Users/michaeltaylor/Codes/bookstore_search/db/seeds.rb:18:in `<top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.0/lib/rails/engine.rb:540:in `load_seed'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/tasks/database_tasks.rb:153:in `load_seed'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:181:in `block (2 levels) in <top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:197:in `block in invoke_prerequisites'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:195:in `each'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:195:in `invoke_prerequisites'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:174:in `block in invoke_with_call_chain'
/Users/michaeltaylor/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `load'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/rake:23:in `<main>'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/michaeltaylor/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:setup => db:seed
Doesn't look like a Postgres issue. Judging by the stack trace, apparently you need to start your ElasticSearch server.

`block (2 levels) in load' exception when running capistrano

Yesterday an unwelcomed visitor was mucking around my server. I since rebooted ubuntu and changed passwords. Now I try to deploy my rails application and I am getting an error.
Here is the important part:
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p327/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p327#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
*** [deploy:update_code] rolling back
* executing "rm -rf /home/guarddog/public_html/guarddog.com/releases/20131220150214; true"
servers: ["172.27.12.xxx", "172.27.12.xxx", "172.27.12.xxx"]
** [deploy:update_code] exception while rolling back: IOError, closed stream
This is stack trace of error:
Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/buffered_io.rb:65:in `recv': Operation timed out - recvfrom(2) (Errno::ETIMEDOUT)
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/buffered_io.rb:65:in `fill'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:228:in `block in postprocess'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:224:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:224:in `postprocess'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:31:in `block in process_iteration'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:43:in `block in ensure_each_session'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:41:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:41:in `ensure_each_session'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:29:in `process_iteration'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:165:in `block (2 levels) in process!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:164:in `loop'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:164:in `block in process!'
from /Users/guarddog/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:163:in `process!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:134:in `process'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:185:in `block in run_tree'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:198:in `block in execute_on_servers'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `each_slice'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `execute_on_servers'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:183:in `run_tree'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:155:in `run'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ./config/deploy.rb:77:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/callback.rb:38:in `call'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:228:in `block (3 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:56:in `transaction'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:227:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:195:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/bin/cap:4:in `<top (required)>'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `<main>'
I think the notable part is this line:
from ./config/deploy.rb:77:in `block (2 levels) in load'
That's actual code in my deploy.rb file:
task :precompile, :role => :app do
run "cd #{release_path}/ && RAILS_ENV=production bundle exec rake assets:precompile"
end
which is executed because of this line in my deploy.rb:
after "deploy:update_code", "deploy:precompile"
Note the deploys were working fine until the incident happened yesterday. He seemed to clone the git repository and copy it somewhere. But he didn't seem to delete any files.
Any idea why deploy:precompile gives the error?
It sounds like your remote codebase may have been compromised. I suggest using
cap deploy:check
cap deploy:cleanup
cap deploy:cold
to redeploy a fresh copy of your original codebase.
This will not modify your remote database, but it will restart the remote httpd server so, as with any deploy, you should wait until a suitable maintenance window to try it.

rake assets:precompile giving "Error: Out of stack space" error

Hi when I am running rake command it is ending up with "Error: Out of stack space".
can you please help me.
I am using rails 3.2.3 and using spree 1.1.1.
Thanks in advance
I have pasted error log below.
** Invoke assets:precompile (first_time)
** Execute assets:precompile C:/Ruby192/bin/ruby.exe C:/Ruby192/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary rake aborted! Error: Out of stack space (in C:/Users/Aahlad/Documents/new new rails/smockcouture/app/assets/javascripts/application.js) C:/Ruby192/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:68:in `extract_result' C:/Ruby192/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec' C:/Ruby192/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile' C:/Ruby192/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:27:in `exec' C:/Ruby192/lib/ruby/gems/1.9.1/gems/uglifier-1.2.4/lib/uglifier.rb:101:in `compile' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/compressors.rb:74:in `compress' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/processing.rb:265:in `block in js_compressor=' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `call' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `evaluate' C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/context.rb:177:in `block in evaluate' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `evaluate' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/bundled_asset.rb:26:in `initialize' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `new' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `build_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/index.rb:89:in `block in build_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/caching.rb:19:in `cache_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/index.rb:88:in `build_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:163:in `find_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/index.rb:56:in `find_asset' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/static_compiler.rb:20:in `block in compile' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:in `block in each_logical_path' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in `block (2 levels) in each_file' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each_entry' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:in `block in each_file' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each_file' C:/Ruby192/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in `each_logical_path' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/static_compiler.rb:18:in `compile' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:56:in `internal_precompile' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' C:/Ruby192/bin/rake:19:in `load' C:/Ruby192/bin/rake:19:in `<main>' Tasks: TOP => assets:precompile:primary rake aborted! Command failed with status (1): [C:/Ruby192/bin/ruby.exe C:/Ruby192/bin/rak...] C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:12:in `ruby_rake_task' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task' C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' C:/Ruby192/bin/rake:19:in `load' C:/Ruby192/bin/rake:19:in `<main>' Tasks: TOP => assets:precompile
I don't know the error but gotta know that it is a windows specific error.I have copied the same application and did rake command in ubuntu and worked well.
I'm getting the same response when I try to precompile using the ckeditor gem. The init.js.erb includes other JS files, some of which are already 'compressed' and as a result, the file is essentially one big string of text without any line breaks. If I open it in Komodoedit I get a warning saying the info is truncated because it is too long. Perhaps this is what is happening when Uglifier tries to read and then compress the string data. I don't know of a solution as it only just recently happened to me. Use rake assets:precompile --trace to see where the error actually crops up.

Resources