Ale*_*dre 9 ruby-on-rails rubymine
我安装了Rails 3.2.3和Ruby 1.9.3,通过这个解决方案 - http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/.它真的很神奇,毫不费力.我这样做时没有错误.
现在我尝试在Rubymine 4中创建一个Rails项目但是有一个错误:"Rails版本 - 找不到Rails gem".
终端告诉我:
alex@ubuntu:~$ rails -v
Rails 3.2.3
alex@ubuntu:~$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
alex@ubuntu:~$
Run Code Online (Sandbox Code Playgroud)
UPDATE
alex@ubuntu:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.24
- RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/alex/.rvm/gems/ruby-1.9.3-p194
- RUBY EXECUTABLE: /home/alex/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
- EXECUTABLE DIRECTORY: /home/alex/.rvm/gems/ruby-1.9.3-p194/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/alex/.rvm/gems/ruby-1.9.3-p194
- /home/alex/.rvm/gems/ruby-1.9.3-p194@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
alex@ubuntu:~$ gem list
*** LOCAL GEMS ***
actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.4)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
json (1.7.3)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.0.3)
rvm (1.11.3.5)
sprockets (2.1.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
alex@ubuntu:~$
Run Code Online (Sandbox Code Playgroud)
Pri*_*ain 27
这可能有助于维生素原.
你需要添加ruby sdks
在RubyMine中从文件 - >设置 - > ruby Sdk和Gems - >添加sdk
您可以添加多个ruby版本sdks及其宝石
从菜单启动项目后,可以编辑项目特定的ruby设置
运行 - >编辑配置 - > ruby sdk(选择特定的rails环境)
$ which ruby #to get current ruby path
Run Code Online (Sandbox Code Playgroud)