Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am following to install gitorious with ruby1.9 installed via rvm. When i try to create admin user i get:

$ 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>'

would appreciate all the help i can get.

share|improve this question
an easy fix is to "cd" to script and run command from there. – Shoaibi May 1 '11 at 6:16

Type the following:

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

There is an enter after production.

share|improve this answer
"env" runs a program in modified environment, usually used to setup variables just for that program instead of globally by using "export". That said, i have tried even your way, doesn't work. Also tried to "export" the RAILS_ENV (and its exported fine) but no use. – Shoaibi Apr 30 '11 at 10:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.