2014-09-05 43 views
1

你好我有問題,開始薄如服務,我的命令來運行瘦是:薄,將無法啓動的服務在Debian

/usr/local/rvm/gems/ruby-2.1.2/bin/thin start --all /etc/thin 

它的運行服務器,我試圖爲自動啓動服務,但我跑得作爲服務:如果我像這樣運行

/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'thin' (>= 0) among 14 total gem(s) (Gem::LoadError) 
Checked in 'GEM_PATH=/.gem/ruby/2.1.0:/usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0', execute `gem env` for more information 
     from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:322:in `to_spec' 
     from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:58:in `gem' 
     from /usr/local/rvm/gems/ruby-2.1.2/bin/thin:22:in `<main>' 
     from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval' 
     from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>' 

service thin start 

我得到了一個錯誤

/etc/init.d/thin start 

服務器啓動。我如何解決這個問題?

+0

here:「GEM_PATH = /。gem/ruby​​/2.1 .0「,如果你運行gem env,不要回到GEM PATHS:/root/.gem/ruby/2.1.0?難道不是因爲某些原因/當您運行「服務精簡啓動」時缺少root? – 2015-04-23 08:59:27

回答

0

確保您在項目的gem文件中有精簡的寶石。通過在一個新行上添加「gem thin」來添加它,然後運行bundle install來確保一切都很開心(可能不需要,但仍然是個好主意)