KonifarPod

resque-webでwebコンソール画面が表示されない

   

Pocket

原因はわからないのですが、resque-webコマンドがこけるようになってちょいちょいと対処したので備忘録。

なんかresque-webを打ったら、Permission denied が出るようになりました。

Konifar:work konifar$ resque-web
[2013-11-25 13:18:18 +0900] Starting 'resque-web'...
[2013-11-25 13:18:18 +0900] trying port 5678...
/Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/vegas-0.1.11/lib/vegas/runner.rb:154:in `initialize': Permission denied - /Users/konifar/.vegas/resque_web/resque_web.url (Errno::EACCES)
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/vegas-0.1.11/lib/vegas/runner.rb:154:in `open'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/vegas-0.1.11/lib/vegas/runner.rb:154:in `write_url'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/vegas-0.1.11/lib/vegas/runner.rb:110:in `start'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/vegas-0.1.11/lib/vegas/runner.rb:77:in `initialize'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/resque-1.25.1/bin/resque-web:13:in `new'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/gems/resque-1.25.1/bin/resque-web:13:in `<top (required)>'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/bin/resque-web:23:in `load'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/bin/resque-web:23:in `<main>'

 

それならsudoだ!ということで、sudo resque-webを打ってもダメでした。

Konifar:work konifar$ sudo resque-web
Password:
/Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find resque (<= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.5] (Gem::LoadError)
 from /Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
 from /Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
 from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/bin/resque-web:22:in `<main>'

 

なんかresqueがない、とか言われてる?bundle installはしてるんだけどな・・・。まぁrescueとresque-webをgem installしてみるかと思いやってみました。

Konifar:work konifar$ gem install resque-web
Fetching: twitter-bootstrap-rails-2.2.8.gem (100%)
Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS.
**********************************************
ExecJS supports these runtimes:
therubyracer - Google V8 embedded within Ruby
therubyrhino - Mozilla Rhino embedded within JRuby
Node.js
Apple JavaScriptCore - Included with Mac OS X
Microsoft Windows Script Host (JScript)
**********************************************
Fetching: resque-web-0.0.4.gem (100%)
Successfully installed twitter-bootstrap-rails-2.2.8
Successfully installed resque-web-0.0.4
2 gems installed
Installing ri documentation for twitter-bootstrap-rails-2.2.8...
Installing ri documentation for resque-web-0.0.4...
Installing RDoc documentation for twitter-bootstrap-rails-2.2.8...
Installing RDoc documentation for resque-web-0.0.4...
Konifar:taptrip konifar$ gem install resque
Successfully installed resque-1.25.1
1 gem installed
Installing ri documentation for resque-1.25.1...
Installing RDoc documentation for resque-1.25.1...

 

まだresqueがないとか言われました。。。もしかしてアドミンの方見てる?と思い、sudo gem install resqueを試してみることにしました。

Installing RDoc documentation for resque-1.25.1...
Konifar:work konifar$ sudo resque-web
/Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find resque (<= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.5] (Gem::LoadError)
from /Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/konifar/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/konifar/.rvm/gems/ruby-1.9.3-p448/bin/resque-web:22:in `<main>'
Konifar:work konifar$ sudo gem install resque
Fetching: redis-3.0.6.gem (100%)
Fetching: redis-namespace-1.3.2.gem (100%)
Fetching: rack-1.5.2.gem (100%)
Fetching: vegas-0.1.11.gem (100%)
Fetching: tilt-1.4.1.gem (100%)
Fetching: rack-protection-1.5.1.gem (100%)
Fetching: sinatra-1.4.4.gem (100%)
Fetching: multi_json-1.8.2.gem (100%)
Fetching: mono_logger-1.1.0.gem (100%)
Fetching: resque-1.25.1.gem (100%)
Successfully installed redis-3.0.6
Successfully installed redis-namespace-1.3.2
Successfully installed rack-1.5.2
Successfully installed vegas-0.1.11
Successfully installed tilt-1.4.1
Successfully installed rack-protection-1.5.1
Successfully installed sinatra-1.4.4
Successfully installed multi_json-1.8.2
Successfully installed mono_logger-1.1.0
Successfully installed resque-1.25.1
10 gems installed
Installing ri documentation for redis-3.0.6...
Installing ri documentation for redis-namespace-1.3.2...
Installing ri documentation for rack-1.5.2...
Installing ri documentation for vegas-0.1.11...
Installing ri documentation for tilt-1.4.1...
Installing ri documentation for rack-protection-1.5.1...
Installing ri documentation for sinatra-1.4.4...
Installing ri documentation for multi_json-1.8.2...
Installing ri documentation for mono_logger-1.1.0...
Installing ri documentation for resque-1.25.1...
Installing RDoc documentation for redis-3.0.6...
Installing RDoc documentation for redis-namespace-1.3.2...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for vegas-0.1.11...
Installing RDoc documentation for tilt-1.4.1...
Installing RDoc documentation for rack-protection-1.5.1...
Installing RDoc documentation for sinatra-1.4.4...
Installing RDoc documentation for multi_json-1.8.2...
Installing RDoc documentation for mono_logger-1.1.0...
Installing RDoc documentation for resque-1.25.1...

と、ここまでやってようやくうまく行きました。

Konifar:work konifar$ sudo resque-web
[2013-11-25 13:24:04 +0900] Starting 'resque-web'...
[2013-11-25 13:24:04 +0900] trying port 5678...

最初の原因は何だったんだろ?久しぶりに起動してみたらできなかったので原因わかりませんが、とりあえず同じようなログが出たらgem installしてみるといいかもしれません。

Pocket

 - Develop ,