Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:01:18+00:00 2026-06-16T02:01:18+00:00

I want to automatically run a script when my Amazon server deploys. However, I

  • 0

I want to automatically run a script when my Amazon server deploys. However, I keep getting the following error in my logs:

/root/start.sh: /usr/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory

I’ve tried massaging my start script, but haven’t found a solution yet. I can load the god file manually, but when I start my machine, I get the following error. How do I set it up so that my bundler/ruby is detected when my script runs?

which ruby => /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby

This is my script that is supposed to autorun (start.sh)

cat /dev/null > /root/log
echo "Starting environment for $(whoami) at $(date)" >> /root/log

export RAILS_ENV=production
export RAILS_ROOT=/root/Rails3/www_rails
export QUEUE_NAME=place_matching

export HOME=/root
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

cd /root/Rails3/www_rails
RAILS_ENV=production bundle exec god -c /root/Rails3/www_rails/god/resque_generic.god >> /root/log 2>&1
echo "Environment running at $(date)" >> /root/log
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:01:19+00:00Added an answer on June 16, 2026 at 2:01 am

    RVM provides documentation for your problem https://rvm.io/integration/god/

    Additionally you could try this script:

    cat /dev/null > /root/log
    echo "Starting environment for $(whoami) at $(date)" >> /root/log
    
    export RAILS_ENV=production
    export RAILS_ROOT=/root/Rails3/www_rails
    export QUEUE_NAME=place_matching
    
    export HOME=/root
    
    "$HOME/.rvm/bin/rvm" in $RAILS_ROOT do bundle exec god -c $RAILS_ROOT/god/resque_generic.god >> /root/log 2>&1
    echo "Environment running at $(date)" >> /root/log
    

    this is new notation of rvm which basically can be wrote down as:

    rvm in /path/to/project do <command> ...
    

    and is equivalent to what you were trying to do.

    One more important thing, if you are running this as a different user thant the one owning RVM then your project .rvmrc requires to be trusted for that new user also. Alternatively you could use one of the new project files that do not require trusting:

    • .ruby-version => 1.9.3@project
    • Gemfile => #ruby=1.9.3@project / ruby="1.9.3"
    • .versions.conf => ruby=1.9.3@project

    Note that the second form also does bundler validation and does not allow patchlevel nor gemset name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to automatically run a simple shell script at linux startup i'm working
I want the following script command to be executed automatically when ever I log
I want to write a script which cleans the 'run' dialogue automatically every log
I want to automatically run a class method defined in a base class on
I have one r function i want to run it automatically(scheduling) after every predefined
I want to automatically deploy a EAR file build in our continuous integration server
I want my script to automatically log the current user out when the script
I want to run my unit tests automatically when I save my Eclipse project.
I have a PowerShell script that is run automatically when our monitoring service detects
I want to make a script that automatically backs up my kindle files when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.