I have some problem when I trying to deploy Sinatra and sidekiq with capistrano.
In mygem file :
gem 'capistrano-sidekiq' , github: 'seuros/capistrano-sidekiq'
Capfile:
require 'capistrano/sidekiq'
Gemfile.lock
capistrano-sidekiq (0.3.3)
sidekiq (3.2.0)
Error when deployed:
**Don't know how to build task 'restart'**
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/dsl/task_enhancements.rb:10:in `after'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/tasks/sidekiq.cap:22:in `block in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/tasks/sidekiq.cap:18:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/sidekiq.rb:2:in `load'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/sidekiq.rb:2:in `<top (required)>'
/home/ubuntu/projects/feed_bidder/feed_bidder_offline/Capfile:6:in `require'
/home/ubuntu/projects/feed_bidder/feed_bidder_offline/Capfile:6:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/cap:23:in `load'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/cap:23:in `<main>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Also when I try to deploy via cap production sidekiq:start -T
Related
I'm trying to start the openhab dashing project, but I'm still having the same error. When I try the dashing with the sample project everything starts perfect, but not with the OpenHab project.
user#server:~/dashboard$ dashing start
/usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require': cannot load such file -- data_mapper (LoadError)
from /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require_with_backports'
from /home/jopo/dashboard/lib/settings.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require_with_backports'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:157:in `block in require_glob'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:156:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:156:in `require_glob'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:166:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing.rb:3:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing.rb:3:in `<top (required)>'
from config.ru:1:in `require'
from config.ru:1:in `block in <main>'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `eval'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `load'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in `run_command'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/lib/thin/runner.rb:156:in `run!'
from /usr/local/lib/ruby/gems/2.0.0/gems/thin-1.6.4/bin/thin:6:in `<top (required)>'
from /usr/local/bin/thin:23:in `load'
from /usr/local/bin/thin:23:in `<main>'
Where do I need to search for the solution?
It is missing a ruby gem. Try to install it with
sudo gem install datamapper
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
Using Ruby 2.0 x64 on Windows. Installed sqlite3 gem by downloading the sqlite3 autoconf sources and compiling. Then I did a gem install sqlite3 --platform=ruby .... However, now when I run rails server, I get the following error. Where is this sqlite3_native.rb? I can't find it anywhere.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from C:/Users/me/my_project/config/application.rb:7:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Here is a tutorial for installing SQLite3 with Ruby 2.0 on Windows.
It is rather a complicated process. Follow the tutorial and see if it works after that.
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.
I have an installation of ruby 1.9.1
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
when I try and run a rake task I am getting an error:
rake aborted!
no such file to load -- ftools
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
C:/Data/Checkouts/mvc2/Cms3/tools/rake/tasks.rb:4:in `<top (required)>'
C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `require'
C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `<top (required)>'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
C:/Ruby/bin/rake:19:in `load'
C:/Ruby/bin/rake:19:in `<main>'
any suggestions would be appreciated.
thanks.
The problem is not in ActiveSupport. It appears in the stack trace simply because it overrides the builtin Kernel#require method.
The file "Cms3/tools/rake/tasks.rb" has require 'ftools' on line 4, but ftools is deprecated in Ruby 1.9. Modify these tasks to use fileutils instead and you'll be good to go.