Run Rails commands on the Ubuntu terminal

2

I'm learning Ruby through an Alura course and I have a question.

  

bash: / usr / local / bin / rails: /usr/bin/ruby2.3: Invalid interpreter:   File or directory not found

To solve this, every time the terminal is opened I execute the command below: source rails server

My question is: Is there any way to automate the execution of the command% source /home/wagner/.rvm/scripts/rvm ? It's getting annoying to have to run it every time the terminal is opened.

    
asked by anonymous 16.06.2016 / 19:16

1 answer

0

Two things can be done:

Add to your file ~/.profile or ~/.bashrc :

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Or the most recommended way, for example in Gnome Terminal :

(PS: Your distribution seems to be in en , I'll move the paths in en , it should not be difficult to find the path)

  

Edit - > Profiles Preferences - > Title and Command

Then you set the option:

"Run command as login shell"

And close and reopen the gnome-terminal.

Source: Integrating RVM with gnome-terminal (en)

    
20.06.2016 / 20:26