我正在关注http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server通过 rvm 安装 ruby1.9 来安装 gitorious。当我尝试创建管理员用户时,我得到:
$ env RAILS_ENV=production ruby script/create_admin
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- script/../config/environment (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/create_admin:2:in `<main>'
我将非常感激所有能得到的帮助。
答案1
输入以下内容:
env RAILS_ENV=production
ruby script/create_admin
script/console production
> user = User.first
> user.login = "christian" # Change to your desired username
> user.activate
> user.accept_terms
> user.save
生产后有一个进入。