2012-12-30 29 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和中提琴,领班现在运行。