Tag: 狂欢

RVM不是一个函数,用'rvm use …'selectruby将不起作用

列出ruby版本 console:~$ rvm list rvm rubies ruby-2.0.0-p481 [ i686 ] # => – current # =* – current && default # * – default 尝试使用特定版本的ruby console:~$ rvm use 2.0.0 RVM is not a function, selecting rubies with 'rvm use …' will not work. You need to change your terminal emulator preferences to allow login shell. […]

如何从代码和testing引用相关文件

我需要从patients.go引用patients.json ,这里是文件夹结构: 如果我做: filepath.Abs("../../conf/patients.json") 它适用于go test ./… revel run go test ./…但失败的revel run 如果我做: filepath.Abs("conf/patients.json") 完全相反的事情发生(狂欢是好的,但testing失败)。 有没有办法正确引用该文件,使其既可以用于testing和正常的程序运行?