#17 楼 @cassiuschen 哈哈,解决了,不用运行那句的,我只是 production: secret_key_base:没设置好。
#1 楼 @although2013 #5 楼 @Rei 找到上上一条的错误,这个提示好像能找到问题
*** Exception RuntimeError in Rack application object (Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`)
问题在于,这个,我打开 config/secrets.yml, 看到
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
可是我没有明白 ENV["SECRET_KEY_BASE"] 在哪设置啊?
#1 楼 @although2013 #5 楼 @Rei 没看懂呀……
2014/11/18 09:18:18 [error] 8971#0: *48 upstream prematurely closed connection while reading response header from upstream, client: xxx, server: xxx, request: "GET / HTTP/1.1", upstream: "passenger:/tmp/passenger.1.0.6206/generation-6/request:", host: "xxx:8888"
用这个
netstat -lnp | grep 8888
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 6206/nginx
五道口都有别墅?好想参观一下……
楼主你看,我也可以用这个马甲给你回复。
#12 楼 @southwolf 求膜拜是什么意思啊?
我旁边的位置多了一个七牛的小公仔,前后左右及座位主人都说不是他们的……有人认领么?没人认领我要了哦!正好之前想换一直换不来……
木有好心人,但有个女生用书包多占了一个座,然后我用了……
这帖要置顶啊!另外,我都找不到 19wu 的地址……
#30 楼 @floger #31 楼 @flowerwrong
现在情况如下:
$ wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm
rpm -ih MySQL-shared-5.6.15-1.el6.x86_64.rpm
$ wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-compat-5.6.15-1.el6.x86_64.rpm
rpm -ih MySQL-shared-compat-5.6.15-1.el6.x86_64.rpm
$ rpm -qa|grep -i MySQL
MySQL-shared-5.6.15-1.el6.x86_64
MySQL-server-5.6.15-1.el6.x86_64
MySQL-client-5.6.15-1.el6.x86_64
MySQL-shared-compat-5.6.15-1.el6.x86_64
MySQL-devel-5.6.15-1.el6.x86_64
问题解决了!谢谢谢谢啊:)真的太好了!折腾了两三天!
#31 楼 @flowerwrong 根据官方手册写的和我的版本 (MySQL-server-5.6.15-1.el6.x86_64, MySQL-client-5.6.15-1.el6.x86_64, MySQL-devel-5.6.15-1.el6.x86_64), 我觉得我需要安装 MySQL-shared-compat . 你给的解决方案我觉得对,但我觉得你给的版本应该改为 MySQL-shared-5.6.15-1.el6.x86_64.rpm,或者 MySQL-shared-compat-5.6.15-1.el6.x86_64.rpm。 我正在找匹配的地址。
#30 楼 @floger 555,好像不行,竟然说我没装 lib
$ sudo yum remove mysql-libs
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Remove Process
No Match for argument: mysql-libs
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: mirrors.ustc.edu.cn
Package(s) mysql-libs available, but not installed.
No Packages marked for removal
好像下面那个能下载成功,可是它为什么带着 redhat-package 的说法的?我用 centos 的哦,有针对性的吗?
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm/from/http://cdn.mysql.com/
--2014-10-31 06:31:36-- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm/from/http://cdn.mysql.com/
正在解析主机 dev.mysql.com... 137.254.60.11
正在连接 dev.mysql.com|137.254.60.11|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm [跟随至新的 URL]
--2014-10-31 06:31:36-- http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm
正在解析主机 cdn.mysql.com...
23.41.85.226
正在连接 cdn.mysql.com|23.41.85.226|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1937596 (1.8M) [application/x-redhat-package-manager]
正在保存至: “index.html”
100%[====================================================================================================================>] 1,937,596 1.00M/s in 1.8s
2014-10-31 06:31:45 (1.00 MB/s) - 已保存 “index.html” [1937596/1937596])
但又安装不上:
$ rpm -ih MySQL-shared-5.6.15-1.el6.x86_64.rpm
error: open of MySQL-shared-5.6.15-1.el6.x86_64.rpm failed: 没有那个文件或目录
ldd /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/mysql2-0.3.16/mysql2/mysql2.so
linux-vdso.so.1 => (0x00007fff5bd47000)
libruby.so.2.1 => /usr/local/rvm/rubies/ruby-2.1.2/lib/libruby.so.2.1 (0x00007f0a83f1e000)
libmysqlclient_r.so.16 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007f0a83cfa000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0a83add000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f0a838a5000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f0a8368c000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0a83408000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f0a8319b000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f0a82db8000)
librt.so.1 => /lib64/librt.so.1 (0x00007f0a82bb0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f0a829ab000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0a82618000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0a845cb000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f0a823b6000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f0a82171000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f0a81e8b000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f0a81c87000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f0a81a5a000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f0a8184f000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f0a8164b000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f0a81431000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f0a81212000)
看来我机子上应该是没有这个文件的。 之前的应该是复制过去的吧……
$ bin/rake db:migrate
rake aborted!
LoadError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/mysql2-0.3.16/mysql2/mysql2.so
有可能是你说的那个『 mysql-libs 是 5.1.17 的版本,和 Mysql 5.6 有冲突』的问题。 但我看不懂你这两句命令不太敢用啊……
sudo yum remove mysql-libs
会删除我现在的 5.1.17 的 lib?
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm/from/http://cdn.mysql.com/
rpm -ih MySQL-shared-5.6.15-1.el6.x86_64.rpm
只是安装匹配的 lib?
#15 楼 @gihnius 哎呀呀,又出错啦!说找不到 libmysqlclient_r.so,请问这个东东在哪里啊?或者我怎么才能让 gem 知道地址啊?
$ bin/rake db:migrate
rake aborted!
LoadError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/mysql2-0.3.16/mysql2/mysql2.so
/usr/local/rvm/gems/ruby-2.1.2/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/usr/local/rvm/gems/ruby-2.1.2/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/usr/local/rvm/gems/ruby-2.1.2/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.2/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/usr/local/rvm/gems/ruby-2.1.2/gems/mysql2-0.3.16/lib/mysql2.rb:8:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
/
#1 楼 @flowerwrong #3 楼 @floger #11 楼 @huacnlee #15 楼 @gihnius #16 楼 @googya #17 楼 @liwei78 #18 楼 @jhjguxin
谢谢各位:)
因为服务器上已经有别的项目在用 MySQL,我不敢像大家建议的那样先删除后安装什么的…… 结果我领导比较彪悍,直接暴力删除,然后把 gem mysql2 装上了,再恢复 mysql,发现又不行了。 最后,听说他把 libmysqlclient.a, libmysqlclient_r.a, libmysqlservices.a 放到 /usr/lib64下,就可以了…… 反正,现在是可以了,天都亮了!
再次谢谢各位朋友帮忙!非常感谢!