今天我尝试这个指南在我的共享主机安装管理平台安装管理平台:错误在共享主机
http://unixserveradmin.com/archives/691
但我被困在安装mysql的宝石。
[[email protected] ~]$ gem install mysql -with-mysql-config=/user/bin/mysql_config
Fetching: mysql-2.8.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql:
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 /home/trebolbi/th-mysql-config=/user/bin/mysql_config/gems/mysql-2.8.1 for inspection.
Results logged to /home/trebolbi/th-mysql-config=/user/bin/mysql_config/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
问题是更大的,但因为有我的服务器,一个在我的本地主文件夹,一个服务器的bin文件夹上2个安装。
这使得命令不会没有错误地执行。
例如,对于这一步:
- 登录到SSH,运行“耙宝石:安装”从Ruby的应用程序路径
我得到这个错误...
[[email protected] RedMine]$ rake gems:install
/usr/bin/rake:16:in `load': no such file to load -- rake (LoadError)
from /usr/bin/rake:16
如果我尝试使用我的本地安装执行命令:
[[email protected] RedMine]$ ./../../ruby/gems/bin/rake gems:install
我收到很多错误,所有与“Gem :: SourceIndex#add_spec从/usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91调用”相关的错误。 ...正如你所看到的,它会在服务器bin directoy(/ usr/local/bin)中查找gem,而不是在本地用户安装ruby(/ home/user/ruby/gems/bin)中。
我只是要执行这个命令来获取安装完成...
gem install mysql
cd /home/trebolbi/rails_apps/RedMine
rake gems:install
rake generate_session_store
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
,我想从我的帐户,并与我的本地Ruby安装执行它们,但我得到所有这些错误.. 。 我究竟做错了什么?
我没有使用捆绑软件宝石,但因为它看起来也是一个正确的答案,所以我会将其设置为我接受的答案!我使用绝对路径的宝石顺便说一句,这件事几乎是什么。谢谢! – RodrigoCR 2012-03-16 06:42:15