Tag: rvm

RubyMineunit testing – 测试框架意外退出

当我尝试从RubyMine中运行测试时,我遇到了问题。 但奇怪的是,当我从命令行运行测试时,它工作正常。 “测试框架意外退出” /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Itest /Users/sabour/Desktop/EIP/project/test/controllers/categories_controller_test.rb Testing started at 1:39 AM … Run options: –seed 14336 # Running tests: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: warning: nested repeat operator + and ? was replaced with ‘*’ … Finished tests in 2.554592s, 1.1744 tests/s, 8.6119 assertions/s. 3 tests, 22 assertions, 0 failures, 0 errors, 0 skips Process finished with […]

如何撤消vendor / gems bundle install

我运行bundle install vendor/gems ,所有的gem都按预期保存到gems目录,但当我删除它们时 rm -rf vendor/gems rails s Could not find rake-0.9.2.2 in any of the sources Run `bundle install` to install missing gems. 我需要再次运行bundle install,所有vendor/gems再次安装到vendor/gems 。 有没有办法让这种行为停止,只是安装,因为我曾经使用我的.rvmrc文件,而不是将gem包装在vendor / gems目录中

不小心运行$ gem update –system后无法运行rails服务器

我跑了gem update –system认为它会解决我遇到的问题,现在我无法运行rails server 。 它不会加载,而是我继续得到以下。 有人可以告诉我如何撤消这个并恢复到我运行更新之前? 我已经运行了git checkout ,但问题仍然存在…… /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170′: uninitialized constant Gem::SourceIndex (NameError) from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems’ from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints’ from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:14:in `setup’ from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup’ from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:66:in `setup’ from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:78:in `’ from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require’ from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require’ from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require’ from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `’

切换到zsh会在命令行中断开rails

我刚刚切换到使用zsh和oh-my-zsh,我在使用rails命令行工具时遇到了问题。 以下是我遇到的步骤,以及我收到的错误。 我运行了github页面提供的curl命令: curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh 然后我去运行rails s,这是我收到的以下错误消息: .rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs’: Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) 这看起来像我有一个gem错误所以我重新安装rvm,rails和bundler没有解决问题。 但是,如果我将我的终端切换回bash,那么我没有任何问题,导轨工作得非常好。 还有其他人遇到过类似的问题吗? 我想使用zsh,因为它似乎有更好的function,但如果我不能使用rails,那么我必须将其转储到路边。 这些是我的.zshrc文件末尾的行: export PATH=/Users/thomascioppettini/.rvm/gems/ruby-1.9.3p0/bin:/Users/thomascioppettini/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/thomascioppettini/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/thomascioppettini/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

当改成Rails文件夹时,有rvm选择ruby和gemset吗?

对于我不同的Rails文件夹,我想让rvm在运行“bundle install”到执行’autotest’或rails console或server之类的任何东西时自动加载正确的gemset。 这可能吗? 目前我必须手动执行’rvm use’,这在我同时处理多个Rails项目时变得有点乏味。

Rvm和gem,捆绑秀和gem列表

我在轨道上使用带有ruby的RVM,当我进行bundle install它显示了比我做gem list时更多的gem? 与rvm有什么关系以及它使用哪条路径? 捆绑安装 mds@db1:~/staging$ bundle Using rake (0.9.6) Using Ascii85 (1.0.1) Using Platform (0.4.0) Using open4 (1.3.0) Using POpen4 (0.1.4) Using activesupport (2.3.17) Using rack (1.1.6) Using actionpack (2.3.17) Using actionmailer (2.3.17) Using activerecord (2.3.17) Using activeresource (2.3.17) Using acts_as_audited (1.1.1) Using addressable (2.2.8) Using builder (3.0.0) Using gyoku (1.0.0) Using nokogiri (1.5.6) […]

Ruby更新后,Rails 3.1rc4资产管道破裂? 如何重新激活/配置它?

不知怎的,这是相关的,但我不确定如何/为什么? 刚刚通过RVM的rvm upgrade命令从Ruby 1.9.2-p180升级到1.9.2-p290 ……现在我的资产管道已经“破损”。 在rvm upgrade …期间rvm upgrade …我注意到每个gemset的一堆错误沿着以下rvm upgrade …行: ERROR: Error running ‘rvm gemset pristine’ under , please read /Users/meltemi/.rvm/log//gemset.pristine.log 我让升级继续,因为gemset.pristine.log中没有太多有趣的内容… 此外,/ /Users/meltemi/.rvm/log//gemset.pristine.log不存在(不能?)存在于确切的路径? 路径名中连续两个’//’? 无论如何… 测试一个小应用程序,虽然它启动并似乎运行它没有加载任何资产(图像,CSS等)。 开发日志有很多Not Found错误(见下文)关于这些丢失的资产,即使它们存在于app/assets/images和app/assets/stylesheets等中……? 有谁知道这里发生了什么? 似乎管道已经崩溃了……好像Rails不再知道在app / assets中寻找资产,也许? 如何测试/validation/修复/重新激活此“管道”? $ rails s => Booting WEBrick => Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000 => Call with -d […]

删除Gems错误

我有2个版本的ruby使用RVM,我试图删除我的gemversion 1.8.7-p302 首先我试过这个,但我得到了错误 ➜ ~ gem list | cut -d” ” -f1 | xargs gem uninstall -aIx Successfully uninstalled actionmailer-2.3.5 Successfully uninstalled actionmailer-2.3.18 Successfully uninstalled actionpack-2.3.5 Successfully uninstalled actionpack-2.3.18 Successfully uninstalled activerecord-2.3.5 Successfully uninstalled activerecord-2.3.18 Successfully uninstalled activeresource-2.3.5 Successfully uninstalled activeresource-2.3.18 Successfully uninstalled activesupport-2.3.5 Successfully uninstalled activesupport-2.3.18 Removing bundle Successfully uninstalled bundler-1.3.5 ERROR: While executing […]

您的Ruby版本是1.9.3,但您的Gemfile指定为2.1.0

当我跑 rails server 我收到了错误。 加载gemsets有一些问题 $rvm list rvm rubies ruby-1.9.3-p484 [ i686 ] ruby-2.0.0-p353 [ i686 ] =* ruby-2.1.0 [ i686 ] # => – current # =* – current && default # * – default $ruby -v ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux] $rails -v Your Ruby version is 1.9.3, but your Gemfile specified […]

使用RVM安装后,Ruby 1.9.2一直恢复到1.8.7

我安装了Ruby 1.9.2。 我使用rvm use 1.9.2然后当我输入ruby -v它说1.9.2。 然后,当我退出终端并重新打开它时,它再次显示1.8.7。 我究竟做错了什么?