我正在尝试将工头用于heroku。这是我的设置中存在的内容:
- 使用 Ubuntu 10.04 机器安装工头
- 安装的 Ruby 版本是:1.9.3-p362
- 安装的 Rubygems 版本为:1.8.24
我可以触发一个工作正常的示例 test.rb 文件。下面的代码:
root@ubuntu-test:~# cat test.rb #/usr/local/rvm/rubies/ruby-1.9.3-p362/bin/ruby require 'rubygems' puts "Hello world!"
使用代码创建了一个 Gemfile:
source :rubygems gem 'sinatra', '1.1.0' gem 'thin'
使用代码创建了一个 Procfile: web: bundle exec ruby test.rb -p $PORT
发布工头开始 - 失败如下:
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
这可能是因为路径设置错误吗?是什么阻止工头启动?
- 拉梅什