[英]Deploying Rails 3 app on bluehost
I keep receiving 500 internal server error 我不断收到500个内部服务器错误
I followed the guide by bluehost found here and still nothing works 我遵循了在这里找到的bluehost的指南,但仍然没有任何效果
~/railstest/public/.htaccess 〜/ railstest / public / .htaccess
Options -MultiViews
PassengerResolveSymlinksInDocumentRoot on
#Set this to whatever environment you'll be running in
RailsEnv production
RackBaseURI /
SetEnv GEM_HOME /home1/railstestc/ruby/gems
~/.bashrc 〜/ .bashrc
export HPATH=$HOME
export GEM_HOME=$HPATH/ruby/gems
export GEM_PATH=$GEM_HOME:/usr/lib64/ruby/gems/1.8
export GEM_CACHE=$GEM_HOME/cache
export PATH=$PATH:$HPATH/ruby/gems/bin
export PATH=$PATH:$HPATH/ruby/gems
If click bluehost's hosting tab, and then click the RubyGems icon you'll see this nice notice down the page a bit: 如果单击bluehost的托管选项卡,然后单击RubyGems图标,您将在页面下方看到此提示:
Using Your Ruby Gem(s)
!!!!At this time Rails 3.0 is not supported and can cause a broken ruby/rails environment!!!!
You will need to add /home4/localvor/ruby/gems to the include path.
You can do this by adding the following code to your script:
$:.push("/home4/localvor/ruby/gems")
In other words, Blue host current doesn't support rails 3 at all.
换句话说,Blue host current根本不支持rails 3。
Or rather, they don't have a javascript run time available.
或者更确切地说,他们没有可用的javascript运行时。
Sorry mate.
不好意思,朋友。
If you run a bundle install, then a bundle --binstubs you'll be able to use ./bin/rake and execute tasks. 如果您运行捆绑安装,那么捆绑--binstubs将可以使用./bin/rake并执行任务。
I can confirm @EJEHardenberg worked. 我可以确认@EJEHardenberg工作。 I had to run
bundle --binstubs
and then all of a sudden it worked. 我必须运行
bundle --binstubs
,然后突然起作用了。
I wouldn't use Bluehost unless you are VERY familiar with Rails and the backend setup requirements, such as Passenger (which BH uses). 除非您非常熟悉Rails和后端设置要求(例如BH所使用的Passenger),否则我不会使用Bluehost。 It took me 6 months (I'm a noob, yes) to get the Rails env working.
我花了6个月的时间(我是菜鸟,是的)来使Rails env正常工作。 Needless to say, my google-fu is much stronger now...
不用说,我的Google-fu现在更强大了...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.