You are not logged in.

#1 2016-07-26 02:58:50

shamans
Member
Registered: 2016-07-23
Posts: 7

Cannot install Rails correctly.

I used pacman to get ruby. Then I used ruby gem to get rails but when I run rails it says "rails command not found". I looked at the documentation to see if this was a common error but couldn't find anything. Any help?

Offline

#2 2016-07-26 15:14:55

FlowIt
Member
Registered: 2014-10-25
Posts: 239

Re: Cannot install Rails correctly.

Most likely because rails is not in your path. In general it is better to use pacman instead of application-specific package managers (python pip for example). There is a rails package in the AUR.

Offline

#3 2016-07-26 18:23:28

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: Cannot install Rails correctly.

You can install rubymine, and everything should work. Also adding quarry to your repos helps deal with everything.

Offline

#4 2016-07-27 00:17:48

shamans
Member
Registered: 2016-07-23
Posts: 7

Re: Cannot install Rails correctly.

FlowIt wrote:

Most likely because rails is not in your path. In general it is better to use pacman instead of application-specific package managers (python pip for example). There is a rails package in the AUR.

So I did not know what "not in your path" meant. I went ahead and read the documentation on environment variables. I understand path is one of the variables. How do I set "rails" to it -- I am not even sure where I installed rails.

EDIT: I found the path for rails but only through a warning message. The doing a gem env would show up something else. Also, right now my path has a ruby 2.3.0 and a ruby 2.3.1. Is this safe? I feel it is only using the 2.3.0 one.

Last edited by shamans (2016-07-27 00:43:19)

Offline

#5 2016-07-28 11:46:02

FlowIt
Member
Registered: 2014-10-25
Posts: 239

Re: Cannot install Rails correctly.

A perfect example why you should NOT install rails via ruby gem, if it installs the binaries somewhere but not in the system directories which are meant for them. Have you tried installing rails from the AUR (or rubymine as zerophase suggested)?

Offline

#6 2016-07-28 12:00:03

sherrellbc
Member
Registered: 2014-05-26
Posts: 112

Re: Cannot install Rails correctly.

Alternatively you can install gems system-wide. I think this system-wide install directory is where Pacman puts gems, so just be careful.

https://wiki.archlinux.org/index.php/ru … ystem-wide

Last edited by sherrellbc (2016-07-28 12:02:30)

Offline

Board footer

Powered by FluxBB