English 中文(简体)
OSX 狮子 B. 新的违约情况会议
原标题:OSX Lion New bash session rvm default ruby not used

我使用OSX狮子。 我已经安装了考试和测验仪,并将这个线放到我的布什——引人瞩目档案中。

[[ -s "/Users/Anand/.rvm/scripts/rvm" ]] && source "/Users/Anand/.rvm/scripts/rvm"  # This loads RVM into a shell session.

我安装了风 rub-1.9.2-p290,把它作为空洞,指挥:

rvm use --default ruby-1.9.2-p290

当我检查<代码>ruby-v时。

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]

问题是,每当我打开一个新的终端窗口或一个表格时,都不会确定违约情况。 相反,系统废墟正在使用。 因此:

ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.3.2]

这也发生在一个废墟项目中。 当一个项目内一米,当一个新表格开张时,我就进入项目目录,但根据该项目的rvmrc,没有设置垃圾。 我应该做些什么来解决这个问题?

问题回答

我谈这个问题。 这笔钱有PATH。 我必须把紧凑的相关线放在最后一条线上。

1. 老年人.bash_profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

source $HOME/Dropbox/dotfiles/bashrc
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export PATH=/Library/PostgreSQL/9.0/bin:$PATH

New bash_profile

source $HOME/Dropbox/dotfiles/bashrc
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export PATH=/Library/PostgreSQL/9.0/bin:$PATH

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

而且,它发挥了作用。 新窗口和新制表与缺损瓦(即1.92瓦)正确打开。

我只是确定这一问题。 引人说,这是一个道路问题。

审判

➜  ~  which ruby

如果您正在读到<代码>/usr/bin/ruby<>/code>,你安装原始垃圾填埋场的道路将掩盖其安装的违约装置。

我在之前添加了通往RVM的道路。 这条道路(见下文)至用户/宾/鲁比,并按预期运作。

我把sh子作为我的耳朵,因此,我不得不在我的.子中人工添加这一内容。

export PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting<br />
export PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

if you use bash

你也许会看到这一点。

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

change it to this:

PATH=$HOME/.rvm/bin:$PATH # Add RVM to PATH for scripting

并且确保你们。 bash_profile has this:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

你们应该好。

Of course this means that your shell is going to look in your RVM directory first when looking for any command, but thats never caused any issues for me.

问题1:

如上表所示,你已经开了——违约和使用。

 rvm --default use ruby-1.9.2-p290

实际设定的缺省情况:

$ rvm list default

Default Ruby (for new shells)

   ruby-1.9.2-p290 [ x86_64 ]

还有一些其他麻烦,如无工作可做。 您的书目档案是否正在装上? 仅仅拥有“Users/Anand/.rvm/scripts/rvm而不是检查来源,也许会错过路? 用户名称从英文大写字母开始?

问题2:你必须把手工艺品明确编成目录,使魔术得以发生。 在某个地方,我假定开始使用一种ole子,那就会产生 r。 我在利用推土机和pop子之间开关时就这样做了。

查询第一期<代码>rvm -default use 工作:

sudo rvm alias create default 1.9.2




相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...