本人学习 ROR 不久,在部署一个从 github 上 clone 下来的网站时遇到了一些问题,这让本人很费解,希望各位高手求教,先谢了!
Ubuntu 里安装了 Passenger+nginx,在 nginx.conf 里添加了一个 host,如下: server { listen 80; server_name localhost ""; root /var/www/mysite/public; passenger_enabled on; }
但访问时出现如下错误, These are the possible causes: There may be a syntax error in the application's code. Please check for such errors and fix them. A required library may not installed. Please install all libraries that this application requires. The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application. A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service. 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: Could not find activesupport-3.2.9 in any of the sources (Bundler::GemNotFound)
Exception class: PhusionPassenger::UnknownError
但是在 mysite 目录下,我运行 bundle install 后提示全部安装成功,也提示了 using activesupport (3.2.9)。然后我 rails server 之后,访问 ip:3000 却可以访问这个网站,说明代码没有问题。而且我把代码 clone 到另外一台 passenger+nginx 的机器,做了同样的 nginx 配置之后就可以访问了。所以我感到很费解。