我尝试使用乘客和 apache 部署我的 rails 应用程序,但收到以下错误消息。
/root/finalProject/app/controllers/static_pages_controller.rb:6: syntax error, unexpected ':', expecting ')' @feed_items = current_user.feed.paginate(page: params[:page]) ^ /root/finalProject/app/controllers/static_pages_controller.rb:6: syntax error, unexpected ')', expecting kEND @feed_items = current_user.feed.paginate(page: params[:page]) ^
static_pages_controller.rb 的代码如下
class StaticPagesController < ApplicationController
def home
if signed_in?
@micropost = current_user.microposts.build
@feed_items = current_user.feed.paginate(page: params[:page])
end
end
end