我有域名www.ecotechno.lv。我想将这个域链接到我的RoR应用程序中。
我做过这样的事:
将我的应用程序上传到/rails_apps文件夹中
创建的符号链接:
ln -s ~/rails_apps/ecotechno/public ~/public_html/ecotechno填充/rails_apps/生态技术/公用文件夹.htacces文件: PassengerAppRoot /home3 3/ecotec11/rails_apps/ecotechno/
<IfModule mod_passenger.c>
Options -MultiViews
PassengerResolveSymlinksInDocumentRoot on
#Set this to whatever environment you'll be running in
RailsEnv development
RackBaseURI /
SetEnv GEM_HOME /home3/ecotec11/ruby/gems/gems
</IfModule>这是通过折叠托管公司的指南!
现在,当我浏览www.ecotechno.lv时,它应该在哪里启动rails应用程序。它显示了文件系统和生态技术符号链接。当我单击它时,会产生错误:
Ruby (Rack) application could not be started
Error message:
Could not find rename-1.0.2 in any of the sources (Bundler::GemNotFound)但是为什么我不能在浏览ecotechno.lv之后首先启动我的应用程序呢?您可以检查www.ecotechno.lv是否有帮助。
提前感谢!
ecotec11@ecotechno.lv [~]# ls -l ~/rails_apps/ecotechno/public
total 32
drwxr-xr-x 3 ecotec11 ecotec11 4096 Sep 27 14:30 ./
drwxr-xr-x 13 ecotec11 ecotec11 4096 Jul 24 02:39 ../
-rw-r--r-- 1 ecotec11 ecotec11 301 Sep 27 14:27 .htaccess
-rw-r--r-- 1 ecotec11 ecotec11 728 Feb 5 2014 404.html
-rw-r--r-- 1 ecotec11 ecotec11 711 Feb 5 2014 422.html
-rw-r--r-- 1 ecotec11 ecotec11 643 Feb 5 2014 500.html
-rw-r--r-- 1 ecotec11 ecotec11 0 Feb 5 2014 favicon.ico
-rw-r--r-- 1 ecotec11 ecotec11 204 Feb 5 2014 robots.txt
drwxr-xr-x 5 ecotec11 ecotec11 4096 Jun 9 11:38 system/发布于 2014-09-28 14:15:39
谢谢大家。所以我修好了这个。
我的解决方案。
1) Rails应用程序必须在../rails_apps/eco中
2)用以下内容创建符号链接:ln -s ~/rails_apps/eco/public ~/public_html/eco
3)在public_html/.htaccess中插入以下代码:
PassengerAppRoot /home3/ecotec11/rails_apps/eco/
<IfModule mod_passenger.c>
Options -MultiViews
PassengerResolveSymlinksInDocumentRoot on
#Set this to whatever environment you'll be running in
RailsEnv development
RackBaseURI /
SetEnv GEM_HOME /home3/ecotec11/ruby/gems/gems
</IfModule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.ecotechno.lv$ [NC]
RewriteRule ^(.*)$ http://www.ecotechno.lv/$1 [L,R=301]
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]
RewriteCond %{HTTP_HOST} ^173\.254\.28\.107
RewriteRule (.*) http://www.ecotechno.lv/$1 [R=301,L]4)在rails_apps/eco/public/.htaccess中:将其保留为空白。
所以我希望有人能帮我。
https://stackoverflow.com/questions/26078720
复制相似问题