rubymine新建rails项目错误信息Could not find gem 'sdoc (>= 0) x86-mingw32'

[rake --tasks] C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:296:in `resolve': Could not find gem 'sdoc (>= 0) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:168:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:129:in `block in resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Users/q/RubymineProjects/Rails1/config/boot.rb:4:in `'
from C:/Users/q/RubymineProjects/Rails1/bin/rake:2:in `require_relative'
from C:/Users/q/RubymineProjects/Rails1/bin/rake:2:in `
'


[rake --prereqs] C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:296:in `resolve': Could not find gem 'sdoc (>= 0) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:168:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:129:in `block in resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Users/q/RubymineProjects/Rails1/config/boot.rb:4:in `'
from C:/Users/q/RubymineProjects/Rails1/bin/rake:2:in `require_relative'
from C:/Users/q/RubymineProjects/Rails1/bin/rake:2:in `
'


-----------------------------------------------------------------------------


C:\Users\q>gem install sdoc
Fetching: rdoc-3.12.2.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:


<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: sdoc-0.3.20.gem (100%)
Successfully installed rdoc-3.12.2
Successfully installed sdoc-0.3.20
2 gems installed
Installing ri documentation for rdoc-3.12.2...
unable to convert U+00A9 from UTF-8 to GBK for lib/rdoc/text.rb, skipping
Installing ri documentation for sdoc-0.3.20...
Installing RDoc documentation for rdoc-3.12.2...
unable to convert U+00A9 from UTF-8 to GBK for lib/rdoc/text.rb, skipping
Installing RDoc documentation for sdoc-0.3.20...


--------------------------------------------------------------
[rake --tasks] C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:296:in `resolve': Could not find gem 'mysql2 (>= 0) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:168:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:129:in `block in resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Users/q/RubymineProjects/railsTest/config/boot.rb:4:in `'
from C:/Users/q/RubymineProjects/railsTest/bin/rake:2:in `require_relative'
from C:/Users/q/RubymineProjects/railsTest/bin/rake:2:in `
'


-------------------------------------------------------------------------

##

## 查看安装了那些gem

##

# 首先起一个server

C:\Users\q>gem server
Server started at http://[::]:8808

Server started at http://0.0.0.0:8808

# 连接port 8808查看安装的gem:

http://localhost:8808


## 或者用命令行gem命令查看:


gem list --local


-------------------------------------------------------------------------



For anyone else experiencing the same problem, I did the following:


1) Download the MySql C Connector from: http://dev.mysql.com/downloads/connector/c/


NOTE Don't download the installer, download the ARCHIVE for your OS


2) Extract the file to C:\mysql-connector


3) Then ran:
gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\mysql-connector\lib" 
--with-mysql-include="C:\mysql-connector\include" --with-mysql-dir="C:\mysql-connector"'

你可能感兴趣的:(Ruby,On,Rails)