按照淘宝Ruby的rails安装指南和RubyChina的Rails环境配置指南配置好了Rails环境,可第二天突然抽风,找不到rails bundle等命令
不可能啊,第一次安还测试过安对了,东找西找,两大种解释,环境变量和环境变量 RubyChina的问题讨论
可是为什么第一次是好的呢?
哦,终于发现一篇有用的文章了,看来找问题还是得去官网啊
rvm官网解答 shell --> 编辑 --> 配置文件首选项 --> 标题和命令 --> 勾选以登陆shell方式运行命令
解释在此:
There are sites that describe this how it was 10 years ago like here orhere so read to see how it works in current world:
`~/.bashrc` is meant for non login invocations, you should not print there any output - it makes tools like `scp` to fail
it is good idea to put environment variables in `~/.bashrc`, things that you depend upon in your scripts (for `ssh server script`)
then if your system does not source `~/.bashrc` by default via `/etc/profile` you should source it in `~/.bash_profile` file so any login shell will have access also to the same environment like non login sessions.
RVM by default adds itself currently to `~/.bash_profile` file, and the recommended way is to enable login shell in gnome-terminal (and screen).