我正在尝试按照本指南将Rails应用程序上传到hostgator:http: //support.hostgator.com/articles/specialized-help/technical/how-do-i-start-using-ruby-on-rails 我'我在5.6点得到一个错误.当我做:
rake generate_session_store
它说找不到gem'rack'并建议我运行bundle install.当我这样做时:
Gem::Installer:ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking for mysql_ssl_set()... no checking for rb_str_set_len()... no checking for rb_thread_start_timer()... no checking for mysql.h... no checking for mysql/mysql.h... no *** 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=/usr/bin/ruby --with-mysql-config --without-mysql-config Gem files will remain installed in /home4/agtcorp/ruby/gems/gems/mysql-2.9.1 for inspection. An error ocurred while installing mysql(2.9.1) and Bundler cannot continue. Make sure that gem install mysql -v '2.9.1 succeeds before bundling.
我明显尝试了gem install mysql -v'2.9.1'.我联系了Hostgator支持,一位Linux管理员对我说:
'我看到你的问题是由于声明的路径不正确.Rakefile目前位于/ home4/agtcorp/rails_apps/agtcorp2 /.也许如果您更新安装以使用正确的路径,它将在完整文件路径/ home4/agtcorp/rails_apps/agtcorp2/Rakefile中找到该文件.
我不知道该怎么做.请帮忙!
我想你错过了"libmysqlclient-dev",请试试:
sudo apt-get install mysql-server mysql-client libmysqlclient-dev