Unicorn Refreshing Gem List2019 Community Moderator ElectionHow to make --no-ri --no-rdoc the default for gem install?Unicorn Install Script with RVM — which executable?“uninitialized constant Gem” or “Rails” when starting Rails 2 appRails 3.1.0 + ruby-1.9.2-p180 cannot work with both unicorn and rakeUnicorns eat up MySQL connections not respecting the pool size - RailsRake des not know how to build task 'compile', how to track this error?How to install a specific version of a ruby gem?Unicorn error : Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)Unicorn worker timeout on AWS boxesSyntaxError in ArticlesController#create on Ruby on Rails
How to write cleanly even if my character uses expletive language?
PTIJ: Halachic Status of Breadboards on Pesach
Bacteria contamination inside a thermos bottle
Violin - Can double stops be played when the strings are not next to each other?
Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?
Non-trivial topology where only open sets are closed
Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible
Happy pi day, everyone!
Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?
When to use a slotted vs. solid turner?
Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?
Employee lack of ownership
If I can solve Sudoku, can I solve the Travelling Salesman Problem (TSP)? If so, how?
Adventure Game (text based) in C++
Book: Young man exiled to a penal colony, helps to lead revolution
Different outputs for `w`, `who`, `whoami` and `id`
Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?
How to prove the triangle inequality for this metric space
Four married couples attend a party. Each person shakes hands with every other person, except their own spouse, exactly once. How many handshakes?
While on vacation my taxi took a longer route, possibly to scam me out of money. How can I deal with this?
How do I hide Chekhov's Gun?
Aluminum electrolytic or ceramic capacitors for linear regulator input and output?
Is it ever recommended to use mean/multiple imputation when using tree-based predictive models?
Why is there is so much iron?
Unicorn Refreshing Gem List
2019 Community Moderator ElectionHow to make --no-ri --no-rdoc the default for gem install?Unicorn Install Script with RVM — which executable?“uninitialized constant Gem” or “Rails” when starting Rails 2 appRails 3.1.0 + ruby-1.9.2-p180 cannot work with both unicorn and rakeUnicorns eat up MySQL connections not respecting the pool size - RailsRake des not know how to build task 'compile', how to track this error?How to install a specific version of a ruby gem?Unicorn error : Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)Unicorn worker timeout on AWS boxesSyntaxError in ArticlesController#create on Ruby on Rails
Guys I'm trying to restart my unicorn service and seems it get stuck on this
[2019-03-06T20:45:05.938802 #7614] INFO -- : Refreshing Gem list
/usr/local/rvm/gems/ruby-2.5.1@citius_artis/gems/unicorn-5.5.0/lib/unicorn.rb:49:in
`block in builder': wrong number of arguments (given 0, expected 2)
(ArgumentError)
Did not change anything on gemfile
If I run rails s -e staging the rails starts normally
Any ideas?
My unicorn.rb config
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__)))
# puts "APP ROOT ->>> #APP_ROOT"
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
# puts "RUBY HOME ->>> #rvm_path"
rvm_lib_path = File.join(rvm_path, 'lib')
# $LOAD_PATH.unshift rvm_lib_path
# require 'rvm'
# RVM.use_from_path! APP_ROOT
rescue LoadError
raise "RVM ruby lib is currently unavailable."
end
end
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
if ENV['RAILS_ENV'] == 'production'
worker_processes 2
else
worker_processes 2
end
working_directory APP_ROOT
preload_app true
timeout 60
listen APP_ROOT + "/tmp/sockets/unicorn.sock", :backlog => 64
pid APP_ROOT + "/tmp/pids/unicorn.pid"
stderr_path APP_ROOT + "/log/unicorn.stderr.log"
stdout_path APP_ROOT + "/log/unicorn.stdout.log"
before_fork do |server, worker|
# puts "SERVER ->>> #server"
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
old_pid = APP_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# puts "Old master alerady dead"
end
end
end
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
config['pool'] = ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5
ActiveRecord::Base.establish_connection(config)
end
end
ruby-on-rails ruby unicorn
add a comment |
Guys I'm trying to restart my unicorn service and seems it get stuck on this
[2019-03-06T20:45:05.938802 #7614] INFO -- : Refreshing Gem list
/usr/local/rvm/gems/ruby-2.5.1@citius_artis/gems/unicorn-5.5.0/lib/unicorn.rb:49:in
`block in builder': wrong number of arguments (given 0, expected 2)
(ArgumentError)
Did not change anything on gemfile
If I run rails s -e staging the rails starts normally
Any ideas?
My unicorn.rb config
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__)))
# puts "APP ROOT ->>> #APP_ROOT"
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
# puts "RUBY HOME ->>> #rvm_path"
rvm_lib_path = File.join(rvm_path, 'lib')
# $LOAD_PATH.unshift rvm_lib_path
# require 'rvm'
# RVM.use_from_path! APP_ROOT
rescue LoadError
raise "RVM ruby lib is currently unavailable."
end
end
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
if ENV['RAILS_ENV'] == 'production'
worker_processes 2
else
worker_processes 2
end
working_directory APP_ROOT
preload_app true
timeout 60
listen APP_ROOT + "/tmp/sockets/unicorn.sock", :backlog => 64
pid APP_ROOT + "/tmp/pids/unicorn.pid"
stderr_path APP_ROOT + "/log/unicorn.stderr.log"
stdout_path APP_ROOT + "/log/unicorn.stdout.log"
before_fork do |server, worker|
# puts "SERVER ->>> #server"
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
old_pid = APP_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# puts "Old master alerady dead"
end
end
end
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
config['pool'] = ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5
ActiveRecord::Base.establish_connection(config)
end
end
ruby-on-rails ruby unicorn
2
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago
add a comment |
Guys I'm trying to restart my unicorn service and seems it get stuck on this
[2019-03-06T20:45:05.938802 #7614] INFO -- : Refreshing Gem list
/usr/local/rvm/gems/ruby-2.5.1@citius_artis/gems/unicorn-5.5.0/lib/unicorn.rb:49:in
`block in builder': wrong number of arguments (given 0, expected 2)
(ArgumentError)
Did not change anything on gemfile
If I run rails s -e staging the rails starts normally
Any ideas?
My unicorn.rb config
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__)))
# puts "APP ROOT ->>> #APP_ROOT"
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
# puts "RUBY HOME ->>> #rvm_path"
rvm_lib_path = File.join(rvm_path, 'lib')
# $LOAD_PATH.unshift rvm_lib_path
# require 'rvm'
# RVM.use_from_path! APP_ROOT
rescue LoadError
raise "RVM ruby lib is currently unavailable."
end
end
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
if ENV['RAILS_ENV'] == 'production'
worker_processes 2
else
worker_processes 2
end
working_directory APP_ROOT
preload_app true
timeout 60
listen APP_ROOT + "/tmp/sockets/unicorn.sock", :backlog => 64
pid APP_ROOT + "/tmp/pids/unicorn.pid"
stderr_path APP_ROOT + "/log/unicorn.stderr.log"
stdout_path APP_ROOT + "/log/unicorn.stdout.log"
before_fork do |server, worker|
# puts "SERVER ->>> #server"
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
old_pid = APP_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# puts "Old master alerady dead"
end
end
end
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
config['pool'] = ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5
ActiveRecord::Base.establish_connection(config)
end
end
ruby-on-rails ruby unicorn
Guys I'm trying to restart my unicorn service and seems it get stuck on this
[2019-03-06T20:45:05.938802 #7614] INFO -- : Refreshing Gem list
/usr/local/rvm/gems/ruby-2.5.1@citius_artis/gems/unicorn-5.5.0/lib/unicorn.rb:49:in
`block in builder': wrong number of arguments (given 0, expected 2)
(ArgumentError)
Did not change anything on gemfile
If I run rails s -e staging the rails starts normally
Any ideas?
My unicorn.rb config
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__)))
# puts "APP ROOT ->>> #APP_ROOT"
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
# puts "RUBY HOME ->>> #rvm_path"
rvm_lib_path = File.join(rvm_path, 'lib')
# $LOAD_PATH.unshift rvm_lib_path
# require 'rvm'
# RVM.use_from_path! APP_ROOT
rescue LoadError
raise "RVM ruby lib is currently unavailable."
end
end
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
if ENV['RAILS_ENV'] == 'production'
worker_processes 2
else
worker_processes 2
end
working_directory APP_ROOT
preload_app true
timeout 60
listen APP_ROOT + "/tmp/sockets/unicorn.sock", :backlog => 64
pid APP_ROOT + "/tmp/pids/unicorn.pid"
stderr_path APP_ROOT + "/log/unicorn.stderr.log"
stdout_path APP_ROOT + "/log/unicorn.stdout.log"
before_fork do |server, worker|
# puts "SERVER ->>> #server"
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
old_pid = APP_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# puts "Old master alerady dead"
end
end
end
after_fork do |server, worker|
if defined?(ActiveRecord::Base)
config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
config['pool'] = ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5
ActiveRecord::Base.establish_connection(config)
end
end
ruby-on-rails ruby unicorn
ruby-on-rails ruby unicorn
edited Mar 7 at 12:45
Pedro Sturmer
asked Mar 6 at 20:53
Pedro SturmerPedro Sturmer
252114
252114
2
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago
add a comment |
2
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago
2
2
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
I was having the same problem and following John Smith's advice this worked for me:
bundle exec gem list | grep unicorn # returns unicorn (5.5.0)
change Gemfile to gem 'unicorn', '5.4.1'
bundle install
bundle exec gem list | grep unicorn # returns unicorn (5.4.1)
Then I was able to restart unicorn without error
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
add a comment |
Looks like there was a bug introduced in 5.5.0
https://bogomips.org/unicorn-public/20190307022859.mxz7m3mbspujo4c2@dcvr/
I tested his patched version and it works:
Set unicorn version in Gemfile
gem "unicorn", "~> 5.5.0.1.g6836"
And ran bundle update unicorn
Good info - thanks!
– adg
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55031954%2funicorn-refreshing-gem-list%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was having the same problem and following John Smith's advice this worked for me:
bundle exec gem list | grep unicorn # returns unicorn (5.5.0)
change Gemfile to gem 'unicorn', '5.4.1'
bundle install
bundle exec gem list | grep unicorn # returns unicorn (5.4.1)
Then I was able to restart unicorn without error
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
add a comment |
I was having the same problem and following John Smith's advice this worked for me:
bundle exec gem list | grep unicorn # returns unicorn (5.5.0)
change Gemfile to gem 'unicorn', '5.4.1'
bundle install
bundle exec gem list | grep unicorn # returns unicorn (5.4.1)
Then I was able to restart unicorn without error
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
add a comment |
I was having the same problem and following John Smith's advice this worked for me:
bundle exec gem list | grep unicorn # returns unicorn (5.5.0)
change Gemfile to gem 'unicorn', '5.4.1'
bundle install
bundle exec gem list | grep unicorn # returns unicorn (5.4.1)
Then I was able to restart unicorn without error
I was having the same problem and following John Smith's advice this worked for me:
bundle exec gem list | grep unicorn # returns unicorn (5.5.0)
change Gemfile to gem 'unicorn', '5.4.1'
bundle install
bundle exec gem list | grep unicorn # returns unicorn (5.4.1)
Then I was able to restart unicorn without error
edited Mar 8 at 6:31
answered Mar 8 at 2:39
adgadg
4151515
4151515
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
add a comment |
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
Yes!! The problem for me was definitively the gemset, I removed the gemset and added again it works for me.
– Pedro Sturmer
Mar 8 at 20:52
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
This works form me too, but this is not solution but only workaround..
– Jack
2 days ago
add a comment |
Looks like there was a bug introduced in 5.5.0
https://bogomips.org/unicorn-public/20190307022859.mxz7m3mbspujo4c2@dcvr/
I tested his patched version and it works:
Set unicorn version in Gemfile
gem "unicorn", "~> 5.5.0.1.g6836"
And ran bundle update unicorn
Good info - thanks!
– adg
yesterday
add a comment |
Looks like there was a bug introduced in 5.5.0
https://bogomips.org/unicorn-public/20190307022859.mxz7m3mbspujo4c2@dcvr/
I tested his patched version and it works:
Set unicorn version in Gemfile
gem "unicorn", "~> 5.5.0.1.g6836"
And ran bundle update unicorn
Good info - thanks!
– adg
yesterday
add a comment |
Looks like there was a bug introduced in 5.5.0
https://bogomips.org/unicorn-public/20190307022859.mxz7m3mbspujo4c2@dcvr/
I tested his patched version and it works:
Set unicorn version in Gemfile
gem "unicorn", "~> 5.5.0.1.g6836"
And ran bundle update unicorn
Looks like there was a bug introduced in 5.5.0
https://bogomips.org/unicorn-public/20190307022859.mxz7m3mbspujo4c2@dcvr/
I tested his patched version and it works:
Set unicorn version in Gemfile
gem "unicorn", "~> 5.5.0.1.g6836"
And ran bundle update unicorn
answered 2 days ago
jjcf89jjcf89
3251212
3251212
Good info - thanks!
– adg
yesterday
add a comment |
Good info - thanks!
– adg
yesterday
Good info - thanks!
– adg
yesterday
Good info - thanks!
– adg
yesterday
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55031954%2funicorn-refreshing-gem-list%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
try downgrading to 5.4
– John Smith
Mar 6 at 23:59
Could you upload your unicorn config code?
– H Dox
Mar 7 at 3:23
updated it @HDox
– Pedro Sturmer
Mar 7 at 12:46
updated @FailingCoder
– Pedro Sturmer
Mar 7 at 12:46
Is it a bug in the updated unicorns or was something deprecated?
– jjcf89
2 days ago