2012-12-30 51 views
0

我正在嘗試使用heroku的工頭。這就是在我的設置存在:工頭開始拋出.profile在Ubuntu 10.04中找不到錯誤

  1. 使用的Ubuntu 10.04機器安裝工長
  2. 安裝
  3. 紅寶石版本:1.9.3-P362
  4. 安裝
  5. RubyGems的版本是:1.8.24
  6. 我可以觸發一個正常工作的示例test.rb文件。下面的代碼:

    [email protected]:~# cat test.rb 
    
    #/usr/local/rvm/rubies/ruby-1.9.3-p362/bin/ruby 
    require 'rubygems' 
    puts "Hello world!" 
    
  7. 創建一個Gemfile中使用代碼:

    source :rubygems 
    gem 'sinatra', '1.1.0' 
    gem 'thin' 
    
  8. 創建一個Procfile與代碼: 網站:捆綁EXEC紅寶石test.rb -p $ PORT

  9. 發行工頭開始 - 失敗如下:

    06:37:09 web.1 | started with pid 3638 
    06:37:09 web.1 | .: 39: .profile: not found 
    06:37:09 web.1 | exited with code 2 
    06:37:09 system | sending SIGTERM to all processes 
    SIGTERM received 
    

另外我還安裝了特殊版本的工頭(0.60.2),它在啓動時顯示與上面相同的錯誤。

.profile文件是在我的機器以下位置:

/home/user/.profile 
    /etc/skel/.profile 
    /root/.profile 

其中包含: #〜/ .profile文件:由Bourne兼容登錄shell執行。

if [ "$BASH" ]; then 
    if [ -f ~/.bashrc ]; then 
    . ~/.bashrc 
    fi 
fi 

mesg n 

難道這是由於錯誤的路徑設置?什麼阻止工頭開始?

  • 拉梅什

回答

1

我得到一個類似的錯誤,但略有更詳細:

21:16:46 bridge.1 | /var/lib/gems/1.9.1/gems/foreman-0.61.0/bin/foreman-runner: 37: .: .profile: not found 

所以我看了一下工頭,亞軍和它看起來像它的試圖從當前目錄加載.profile文件。雖然我從一個目錄中運行領班,但我仍然沒有找到它。

看起來,領班跑步者正在用-p參數調用。然後它測試一個.profile文件的存在,然後才嘗試獲取它。所以它檢查文件,但不能源。實際執行源線如下:

. .profile 

這個文件開始#/ bin/sh的,所以我跑了/ bin/sh的,並試圖! .profile從命令行,果然它抱怨.profile沒有找到,呵?其實它說的是:

/bin/sh: 4: .: .profile: not found 

那是什麼4在那裏做的?也許它只是不喜歡我的.profile中的某些東西。

所以我感動了我的。profile.bak和中提琴,領班現在運行。