[Rails] How to use chruby with sudo and foreman?

瀏覽次數:19 次
跳到第一則未讀訊息

Ricardo do Valle

未讀,
2014年7月8日 下午1:08:052014/7/8
收件者:rubyonra...@googlegroups.com

Please, could you help me?
I am trying to use sudo with chruby and foreman, but without success.

I tried:

$ sudo chruby-exec ruby-2.1.2 -- foreman
$ foreman: command not found

But the same command with rake command works fine.

$ sudo chruby-exec ruby-2.1.2 -- rake --version
$ rake, version 10.1.0

Thank you very much.

Ricardo do Valle

未讀,
2014年7月8日 晚上9:50:432014/7/8
收件者:rubyonra...@googlegroups.com

I just ran $ sudo chruby-exec ruby-2.1.2 -- foreman (as user) to install the gem inside chruby root  user path and it is working now.

--
Ricardo do Valle

Ricardo do Valle

未讀,
2014年7月8日 晚上10:09:562014/7/8
收件者:rubyonra...@googlegroups.com

Only to correct the before e-mail

I just ran $ sudo chruby-exec ruby-2.1.2 -- gem install foreman (as user) to install the gem inside chruby root user path and it is working now.

To install the gem inside chruby root path:

sudo chruby-exec ruby-2.1.2 -- gem install foreman

To use foreman like a root:

--
Ricardo do Valle
回覆所有人
回覆作者
轉寄
0 則新訊息