这是我已经尝试找到答案的地方:教程要点,stackoverflow,另一个堆栈溢出和官方指南。
我仍然不知道我在做什么错。正确配置database.yml后,我尝试创建项目,这是我得到的错误:
“请更新您的PATH以包括构建工具,或从' http://rubyinstaller.org/downloads '下载DevKit并按照' http://github.com/oneclick/rubyinstaller/wiki/Development-Kit '中的说明进行操作
安装mysql2(0.3.13)时发生错误,并且Bundler无法继续。gem install mysql2 -v '0.3.13'
捆绑前确保成功。”
为什么找不到mysql2 v0.3.13?
操作系统:Windows 7 Rails:4.0.0 Ruby:1.9.3 DevKit
我遇到的错误 $ bundle exec rails s Could not locate Gemfile
$ bundle Bundler::GemfileNotFound
`$ gem install mysql2
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=c:/Ruby193/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
extconf.rb:37:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.13 for inspection.`
cd
到正确的目录。ruby -v
)。bundle exec rails -v
。Gemfile
存在。bundle
。bundle exec rails s
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句