安装mysql(2.9.1)时发生错误,Bundler无法继续

 葬宝御用小奶瓶2004 发布于 2022-12-19 13:18

我正在尝试按照本指南将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中找到该文件.

我不知道该怎么做.请帮忙!

1 个回答
  • 我想你错过了"libmysqlclient-dev",请试试:

       sudo apt-get install mysql-server mysql-client libmysqlclient-dev 
    

    2022-12-19 13:20 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有