开发者

App doesn't working after deploying on production server. Development is fine

My app works on my local machine, but won't work on the production server.

Using capistrano, everything is up and running under /var/www/current.

Restarted web server.

Getting the site's custom 404, but can't even retrieve stuff out of /public/images using the direct link.

Getting this in the log:

ActionView::MissingTemplate (Missing template access/index with {:locale=>[:en, :en], :handlers=>[:rxml, :builder, :erb, :rjs, :rhtml], :formats=>[:html]} in view paths "/var/www/releases/20110703002055/app/views", "/var/www/shared/bundle/ruby/1.8/gems/kaminari-0.12.4/app/views"):

I've been playing with routes.rb - here is the only line from it rig开发者_运维问答ht now:

root :to => 'access#index', :as => 'access'

I do have these in access_controller.rb:

  def index    
  end

  def welcome
    respond_to do |format|
       format.html # welcome.html.erb
    end
  end

I have a template index.html.erb and welcome.html.erb in the app/views/access directory.


I don't really know capistrano, but if you are using Git or something like that to push your code to your server, it looks like you have not added all the files to your repository. (it whines over not finding access/index.html.erb)

In git it's like:

git add .
git commit -m "adding missing files"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜