Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 on Ubuntu 12.04 machine. Have a script file which runs when entered manually in terminal

gnome-terminal -e /home/precise/Desktop/cartodb/

The content of script file is

cd /home/ubuntupc/Desktop/cartodb20/
sh /home/ubuntupc/.rvm/scripts/rvm
bundle exec foreman start -p 3000

So what i tried to do is to run this script at every system start up. So on Startup Applications

command: gnome-terminal -e /home/precise/Desktop/cartodb/

On terminal Edit -> Profile Preferences -> Title and Command

Checked the "Run command as a login shell"

But this seems to be not working. When restarted the machine found these error in terminal

The child process exited normally with status 127.
ERROR: RVM Ruby not used, run `rvm use ruby` first.

Some info regarding the installed packages and system.

$ which ruby


$ which rails


$ which gem


$ cat ~/.bash_profile

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

$ which -a ruby


$ sudo update-alternatives --config ruby

update-alternatives: error: no alternatives for ruby.

$ sudo find / -name "rubygems" -print


Please point out what i am missing as i am new to the ruby applications.

Thanks in advance

share|improve this question
up vote 0 down vote accepted

Your code does

sh /home/ubuntupc/.rvm/scripts/rvm

Which will run rvm with no arguments. What you actually want to do is to include the rvm code in your current script, so replace that line with

source $HOME/.rvm/scripts/rvm
share|improve this answer
That solved. Now it works fine. – anjo Jun 2 '14 at 16:44

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.