Error Upgrading GitLab 6.1 to 6.3 [closed] - ruby

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to update Gitlab (6.1 to 6.3) but after the Checkout this happens.
I update the database with the command:
ruby bin/rake db:migrate RAILS_ENV=production
I need to know how to troubleshoot:
Can't connect to local MySQL server through socket '/home/gitlab/mysql/tmp/mysql.sock' (2)
Systeminfo:
Ubuntu 12.10 64
LTS Ruby 2.0,
GitLab 6.1
The full output:
root#j72177:/home/gitlab/apps/gitlab/htdocs# ruby bin/rake db:migrate RAILS_ENV=production
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /home/gitlab/apps/gitlab/htdocs/Rakefile:7)
rake aborted!
Can't connect to local MySQL server through socket '/home/gitlab/mysql/tmp/mysql.sock' (2)
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.15/lib/active_record/model_schema.rb:224:in `table_exists?'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb:5:in `included'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:98:in `include'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:98:in `taggable_on'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:39:in `acts_as_taggable_on'
/home/gitlab/apps/gitlab/htdocs/app/models/issue.rb:38:in `<class:Issue>'
/home/gitlab/apps/gitlab/htdocs/app/models/issue.rb:20:in `<top (required)>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:359:in `require_or_load'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `each'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `const_missing'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `each'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `const_missing'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `each'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:190:in `const_missing'
/home/gitlab/apps/gitlab/htdocs/lib/api/notes.rb:6:in `<class:Notes>'
/home/gitlab/apps/gitlab/htdocs/lib/api/notes.rb:3:in `<module:API>'
/home/gitlab/apps/gitlab/htdocs/lib/api/notes.rb:1:in `<top (required)>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
/home/gitlab/apps/gitlab/htdocs/lib/api/api.rb:1:in `block in <top (required)>'
/home/gitlab/apps/gitlab/htdocs/lib/api/api.rb:1:in `each'
/home/gitlab/apps/gitlab/htdocs/lib/api/api.rb:1:in `<top (required)>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
/home/gitlab/apps/gitlab/htdocs/config/initializers/2_app.rb:13:in `block in <top (required)>'
/home/gitlab/apps/gitlab/htdocs/config/initializers/2_app.rb:13:in `each'
/home/gitlab/apps/gitlab/htdocs/config/initializers/2_app.rb:13:in `<top (required)>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `block in load'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `each'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `block in <class:Engine>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/gitlab/apps/gitlab/htdocs/config/environment.rb:5:in `<top (required)>'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:103:in `require_environment!'
/home/gitlab/apps/gitlab/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
root#j72177:/home/gitlab/apps/gitlab/htdocs#

You can check "Can't connect to local MySQL server through socket '/path/to/mysql.sock'" for various common causes behind that error message.
That path is configured in your gitlab/config/database.yml.mysql file.
Mainly:
check that your mysql is running (mysqladmin -u root -p status)
check the access rights (sudo chmod -R 755 /home/gitlab/mysql/tmp/mysql)
check your /etc/mysql/my.cnf
check how/if you have installed mysql-server.
Also make sure you follow the migration process:
sudo -u git -H bundle install --without development test postgres --deployment
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

Related

Diaspora (Ruby) run Error, Maybe PATH Problem? "uninitialized constant TurboDevAssets (NameError)"

I try to migrate diaspora from a damaged debian 8 to another gentoo. I want to be able to can run diaspora before I deploy the web server. I crashes because of Ruby Errors, maybe kind of PATH errors.
When I run diaspora with script/server in production mode it crashes because the thing behind web.pid crashes. In the log eye_processes_stderr.log is:
bin/bundle:3:in `load': cannot load such file -- /usr/lib/ruby/bin/bundle (LoadError)
from bin/bundle:3:in `<main>'
In development mode I can not execute correctly (I tried it to get better error message reporting):
RAILS_ENV=development bin/rake db:migrate RAILS_ENV=development
bin/rake assets:precompile
because of the stdout and stderr of script/server I run: bin/bundle exec unicorn -c config/unicorn.rb
In production mode it returns:
that I shall look into stderr
and in the log there is nothing helpful, in:
tail log/eye_processes_stderr.log:
bin/bundle:3:in `load': cannot load such file -- /usr/lib/ruby/bin/bundle (LoadError)
from bin/bundle:3:in `<main>' bin/bundle:3:in `load': cannot load such file -- /usr/lib/ruby/bin/bundle (LoadError)
from bin/bundle:3:in `<main>'
But in development mode it returns:
I, [2019-10-07T11:14:20.840060 #20262] INFO -- : Refreshing Gem list
/home/diaspora/diaspora-2017-07-07-newest/config/environments/development.rb:64:in `block in <top (required)>': uninitialized constant TurboDevAssets (NameError)
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/railtie.rb:211:in `instance_eval'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/railtie.rb:211:in `configure'
from /home/diaspora/diaspora-2017-07-07-newest/config/environments/development.rb:3:in `<top (required)>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/engine.rb:599:in `each'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/engine.rb:599:in `block in <class:Engine>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:30:in `instance_exec'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:30:in `run'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:59:in `block in run_initializers'
from /usr/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /usr/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:48:in `each'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:48:in `tsort_each_child'
from /usr/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /usr/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /usr/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /usr/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /usr/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /usr/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/initializable.rb:58:in `run_initializers'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/railties-5.1.6.2/lib/rails/application.rb:353:in `initialize!'
from /home/diaspora/diaspora-2017-07-07-newest/config/environment.rb:7:in `<top (required)>'
from config.ru:10:in `require'
from config.ru:10:in `block in <main>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/unicorn-5.5.0/lib/unicorn.rb:54:in `eval'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/unicorn-5.5.0/lib/unicorn.rb:54:in `block in builder'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/unicorn-5.5.0/lib/unicorn/http_server.rb:794:in `build_app!'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/unicorn-5.5.0/lib/unicorn/http_server.rb:141:in `start'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/gems/unicorn-5.5.0/bin/unicorn:128:in `<top (required)>'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `load'
from /home/diaspora/diaspora-2017-07-07-newest/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `<main>'
and now it returns that also in production mode, after I executed it in development mode.
line 64 in
/home/diaspora/diaspora-2017-07-07-newest/config/environments/development.rb
is:
# Speed up asset serving
config.middleware.insert 0, TurboDevAssets
It shall run as it did with every working diaspora as it has worked on debian 8 when I used rvm in the home directory. (as I also tried that on the Gentoo machine)

"bundle exec rake test" is pending

When I run bundle exec rake test under my application, It's pending forever. And then I entered Ctrl-c to stop it. Then it gives these message:
^C/home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:54:in `gets': Interrupt
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:54:in `verify_server_version'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:25:in `call'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ishamo/ra/sample_app/bin/spring:13:in `require'
from /home/ishamo/ra/sample_app/bin/spring:13:in `<top (required)>'
from bin/rake:3:in `load'
from bin/rake:3:in `<main>'
rake aborted!
Interrupt:
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:401:in `system'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:401:in `block in load_schema_if_pending!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:398:in `load_schema_if_pending!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:411:in `block in maintain_test_schema!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:642:in `suppress_messages'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:416:in `method_missing'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:411:in `maintain_test_schema!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_help.rb:19:in `<top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/home/ishamo/ra/sample_app/test/test_helper.rb:3:in `<top (required)>'
/home/ishamo/ra/sample_app/test/controllers/static_pages_controller_test.rb:1:in `require'
/home/ishamo/ra/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `block (3 levels) in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `each'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `block (2 levels) in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:113:in `each'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:113:in `block in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:20:in `invoke_rake_task'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/testing.rake:8:in `block in <top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/home/ishamo/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => test:run
(See full trace by running task with --trace)
I am a beginner. Would you please tell me how to do it? Appreciate.
I have sometimes noticed this problem myself also, where the console hangs because an issue in Rails Spring. Spring is a Rails application preloader, designed to make developing and testing a Rails application faster.
Try running:
spring stop
or:
bin/spring stop
..and then try again.
If that doesn't help then comment out the line in your Rakefile that says:
# Spring speeds up development by keeping your application running
# in the background. Read more: https://github.com/rails/spring
gem 'spring'
This will disable Spring altogether. Rails will start a little slower (no in-memory preloading), but you will avoid the hanging issue.
This issue seems to have been discussed previously on GitHub here:
https://github.com/rails/spring/issues/265

My server wont start,ruby on rails mac

Blockquote
When i try to run bin/rails server,my server wont start up it will just display some connection errors or whatever.I tried bundle exec rails server but it didnt work either.
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/i/blog/config/routes.rb:7:in `<top (required)>': undefined method `resources' for main:Object (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/i/blog/config/environment.rb:5:in `<top (required)>'
from /Users/i/blog/config.ru:3:in `require'
from /Users/i/blog/config.ru:3:in `block in <main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /Users/i/blog/config.ru:in `new'
from /Users/i/blog/config.ru:in `<main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in `app'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/i/blog/bin/rails:8:in `require'
from /Users/i/blog/bin/rails:8:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client.rb:26:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/bin/spring:48:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/i/blog/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
heres my config/routes file
Rails.application.routes.draw do
resources :articles
root 'welcome#index'
end
resources :articles do
resources :comments
end
You have to read stacktraces from the top to understand wat is going on:
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
This is just a warning, you may want to fix that later. But you can ignore that at the moment, since it is just a warning.
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
This is the default output when Rails boots.
But now the interesting part:
Exiting
/Users/i/blog/config/routes.rb:7:in `<top (required)>': undefined method `resources' for main:Object (NoMethodError)
This line tells you that you have a undefined method 'resources' in the 7th line (or before that line) of your config/routes.rb.
The problem is caused by the second resources :articles block that is not within the outer Rails.application.routes.draw block. Furthermore you have two resources :articles, but you only need one. Copy the following version to config/routes.rb to fix your issue:
Rails.application.routes.draw do
root 'welcome#index'
resources :articles do
resources :comments
end
end

heroku run error, bad URI

I can run the application on my local mac pc.
But when I run heroku I got this error. But I have no idea...
zzz-ui-MacBook-Pro:backend zzz$ heroku run bundle exec rails console
Running `bundle exec rails console` attached to terminal... up, run.7525
Connecting to database specified by DATABASE_URL
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): (URI::InvalidURIError)
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven/configuration.rb:96:in `server='
from /app/config/initializers/raven.rb:5:in `block in <top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven.rb:62:in `configure'
from /app/config/initializers/raven.rb:4:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `block in load'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /app/config/environment.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:103:in `require_environment!'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Please help me.
Thanks ~!!
The error is coming from:
config/initializers/raven.rb
which looks like it has something to do with the sentry-raven gem, based on the stack trace lines right above that. You should check the documentation for that gem and make sure that any code in that initializer plus any environment variables are set appropriately for your production environment on heroku.
Check your config variables, particularly DATABASE_URL as shown here. Also verify you used the Heroku add-ons for Postgres, Mongo, Neo4J, or whatever you're using rather than connect anything yourself.

Error trying to use image_science in a rails project on ubuntu 12.04

I have a rails 3.0.20 app running with rvm on ruby 1.9.3p327. My Gemfile reads:
gem 'image_science', :git => 'git://github.com/asynchrony/image_science.git'
and Gemfile.lock has its version as:
remote: git://github.com/asynchrony/image_science.git
revision: dc36ddaadc46aecdef907de3c41a9d14d28ba8d8
specs:
image_science (1.3.2.1.Asynchrony)
I cannot seem to start my app without removing image_science, since I keep getting this error:
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require': iconv will be deprecated in the future, use String#encode instead.
rake aborted!
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE - /home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science.rb:3:in `<top (required)>'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
/home/umar/myprojects/a_proj/config/application.rb:9:in `<top (required)>'
/home/umar/myprojects/a_proj/Rakefile:4:in `require'
/home/umar/myprojects/a_proj/Rakefile:4:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `load'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `<main>'
How can I fix this error.
You may need to install the required libraries (FreeImage and RubyInline) to make ImageScience work. (ImageScience RDoc)
By the way, I assume that you don't use mini_magick or rmagick because you don't have access to an imagemagick or graphicsmagick installation.
Perhaps you should try to use one of these two, because ImageScience has not been updated for a while.
Hope this helps.

Resources