开发者

REE rake gems:install is not working correct

I've installed REE on CentOS 5 for a very special task (using rails 2.3.10 and ruby 1.8) and I really need it to be isolated

In this case I won't use bundler or smth so.

Everything works ok if I'll setup every gem manually via

/opt/ree/bin/gem install agem

But when I run

/opt/ree/bin/rake gems:install

in prepared for 开发者_JS百科this command project - all (or most, I haven't check every dependency) gems are installed via /usr/bin/gem into common gem path, where I do not need any of them

This is an issue and I do not want to install all gems manually. Have smb ever hit into this issue and probably knows solution?


Solution that really helped me was to temporarily replace /usr/bin/gem with a symbolic link to /opt/ree/bin/gem

With this replacement /opt/ree/bin/rake gems:intall worked as expected - all required gems were installed to REE path - returning /usr/bin/gem to original gem executable made system stable again

This is not very clean solution but it works, so it can be used like hammer in critical situation.


There's either a GEM_HOME variable somewhere in the environment, or the runtime ruby called is not ree. Therefore, I'd suggest at least 3 things to try:

  • Start with an almost empty environment (run env -i sh for example) and run again the rake command, see if this is still installs gems in the common gem path. Be careful, because env -i is an empty environment, you might see complaints from rubygems (because no HOME or nothing else is set)...
  • Check that the shebang line (first line of the rake program) really indicates your REE binary and not something else
  • Finally, do run rake using the REE binary with /opt/ree/bin/ruby /opt/ree/bin/rake gems:install

This should give you an indication of what's going wrong. All in all, I think that the environment issue is probably the most probable culprit of this thing

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜