简体   繁体   English

Rails服务器不能在Rubymine中工作,而可以在终端中工作吗?

[英]Rails server not working in Rubymine but working in terminal?

I am running Ubuntu 12.04 with rvm env : 我正在使用rvm env运行Ubuntu 12.04:

export PATH ; PATH="/home/wojtek/.rvm/gems/ruby-1.9.3-p392/bin:/home/wojtek/.rvm/gems/ruby-    1.9.3-p392@global/bin:/home/wojtek/.rvm/rubies/ruby-1.9.3-    p392/bin:/home/wojtek/.rvm/bin:$PATH"
export rvm_env_string ; rvm_env_string='ruby-1.9.3-p392'
export rvm_path ; rvm_path='/home/wojtek/.rvm'
export rvm_ruby_string ; rvm_ruby_string='ruby-1.9.3-p392'
unset rvm_gemset_name
export RUBY_VERSION ; RUBY_VERSION='ruby-1.9.3-p392'
export GEM_HOME ; GEM_HOME='/home/wojtek/.rvm/gems/ruby-1.9.3-p392'
export GEM_PATH ; GEM_PATH='/home/wojtek/.rvm/gems/ruby-1.9.3-    p392:/home/wojtek/.rvm/gems/ruby-1.9.3-p392@global'
export MY_RUBY_HOME ; MY_RUBY_HOME='/home/wojtek/.rvm/rubies/ruby-1.9.3-p392'
export IRBRC ; IRBRC='/home/wojtek/.rvm/rubies/ruby-1.9.3-p392/.irbrc'
unset MAGLEV_HOME
unset RBXOPT

When try to start the app in RubyMine 5.0.2 I get: 当尝试在RubyMine 5.0.2中启动应用程序时,我得到:

/home/wojtek/.rvm/rubies/ruby-1.9.3-p392/bin/ruby     /home/wojtek/workspace/quotes/script/rails server -b 0.0.0.0 -p 3000 -e development
/home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find i18n-0.6.1 in any of the sources (Bundler::GemNotFound)
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `map!'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb:85:in `materialize'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/definition.rb:114:in `specs'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/definition.rb:159:in `specs_for'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/definition.rb:148:in `requested_specs'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/environment.rb:18:in `requested_specs'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/runtime.rb:13:in `setup'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler.rb:120:in `setup'
from /home/wojtek/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.4/lib/bundler/setup.rb:17:in `<top (required)>'
from /home/wojtek/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/wojtek/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'

Process finished with exit code 1

When I run the same command line in a terminal it works fine: 当我在终端中运行相同的命令行时,它可以正常工作:

/home/wojtek/.rvm/rubies/ruby-1.9.3-p392/bin/ruby /home/wojtek/workspace/quotes/script/rails server -b 0.0.0.0 -p 3000 -e development

Any ideas what might be happening? 任何想法可能会发生什么?

  1. Go to Settings -> Ruby SDK and gems and select Ruby1.9.3_orsomething_[global] (the [global] is the important part) in Ruby SDK . 进入Settings -> Ruby SDK and gems ,并选择Ruby1.9.3_orsomething_[global] (在[global]中的重要组成部分) Ruby SDK
  2. Run Tools -> Bundler -> Install . 运行Tools -> Bundler -> Install

Dont know why, but it worked. 不知道为什么,但是有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM