相关疑难解决方法(0)

.bashrc,.bash_profile和.environment之间有什么区别?

我已经使用了许多不同的基于*nix的系统,看起来我使用的Bash的每种风格都有不同的算法来决定运行哪些启动脚本.出于设置环境变量和别名以及打印启动消息(例如MOTD)等任务的目的,启动脚本是否适合执行这些操作?

是什么把事情之间的差异.bashrc,.bash_profile以及.environment?我也看到其他的文件,例如.login,.bash_login.profile; 这些是否相关?在物理登录,通过ssh远程登录以及打开新的终端窗口时,运行哪些不同?跨平台(包括Mac OS X(及其Terminal.app)和Cygwin Bash)是否存在显着差异?

bash shell environment

130
推荐指数
4
解决办法
45万
查看次数

在执行rvm使用2.0.0 --default时出现"警告!PATH未正确设置"

以上不是第一次工作,第二次工作.

尝试将ruby版本设置为2.0.0以用于任何新的shell窗口.

$ rvm use 2.0.0 --default
Run Code Online (Sandbox Code Playgroud)

Warning! PATH is not properly set up, '/home/durrantm/.rvm/gems/ruby-1.9.3-p125/
bin' is not at first place,
         usually this is caused by shell initialization files - check them for '
PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --au
to-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p125'
.
Using /home/durrantm/.rvm/gems/ruby-2.0.0-p247
Run Code Online (Sandbox Code Playgroud)

然后做同样的事情

$ rvm use 2.0.0 --default
Run Code Online (Sandbox Code Playgroud)

现在没有错误,即

$ rvm use 2.0.0 --default
Using …
Run Code Online (Sandbox Code Playgroud)

ruby bash .bash-profile rvm ruby-2.0

103
推荐指数
8
解决办法
6万
查看次数

警告!PATH未正确设置,通常这是由shell初始化文件引起的

每当我转到带有文件的.rvmrc文件夹时,都会发出警告:

Warning! PATH is not properly set up, '/home/me/.rvm/gems/ruby-2.0.0-p247/bin' is not available,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         to fix run: 'rvm use ruby-2.0.0-p247'.
Run Code Online (Sandbox Code Playgroud)

我做了rvm use ruby-2.0.0-p247,但警告仍然存在.

注意:没有错误,我能够正常运行我的应用程序,但警告非常烦人.有任何想法吗?

ruby rvm

45
推荐指数
5
解决办法
3万
查看次数

标签 统计

bash ×2

ruby ×2

rvm ×2

.bash-profile ×1

environment ×1

ruby-2.0 ×1

shell ×1