2

我安装了 Ubuntu 12.04 并且我的(生产!)Rails 应用程序出现故障。

当我的网站完全关闭时,我急于尝试修复它。

A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file.     Please check it in order to analyse the problem.
Error message:
libmysqlclient_r.so.16: cannot open shared object file: No such file or directory - /domains/myapp.com/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2/mysql2.so

我试过sudo gem install mysql2了,但它没有改变任何东西。请帮忙!我不知道出了什么问题,同时我的应用程序正在向我的用户显示堆栈跟踪!感谢您的任何想法!

我有一种预感,这可能是一个路径问题。例如,我尝试用cd我的方式找到那个mysql2.so丢失的文件并发现一条奇怪的消息:

cd /domains/myapp.com/shared/bundle/ruby/1.9.1/gems/
deploy@myserver:/domains/myapp.com/shared/bundle/ruby/1.9.1/gems$ cd mysql2-0.3.11/
mkdir: cannot create directory `/usr/local/rvm/gems/ruby-1.9.3-p0@mysql2': Permission denied
-bash: /usr/local/rvm/environments/ruby-1.9.3-p0@mysql2: Permission denied
Using /usr/local/rvm/gems/ruby-1.9.3-p0 with gemset mysql2
deploy@myserver:/domains/myapp.com/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11$ pwd
/domains/myapp.com/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11
deploy@myserver:/domains/myapp.com/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11$ ls -l

这些信息本身就很奇怪。通常会cd触发? mkdir这是否以某种方式表明该文件存在,但我需要以某种方式为其添加路径?

4

1 回答 1

4

看起来您需要重新部署您的应用程序并使用系统依赖项重建您的 gem。在系统范围内安装 gem 不会有帮助。这是指示的,因为shared/bundle它在路径中。

于 2013-02-08T19:25:37.787 回答