RoR Production Server Problem

June 7, 2015 745 views
One-Click Install Apps Ruby on Rails

Hello,
I try to upload a web app that runs locally to the web. Locally, the app runs fine.
After uploading it, I tried to access it via the url and I got an error message. The production log is:

I, [2015-06-07T19:52:48.703028 #1110] INFO -- : Started GET "/" for 194.219.250.210 at 2015-06-07 19:52:48 +0000
I, [2015-06-07T19:52:48.710201 #1110] INFO -- : Processing by ReviewController#new as HTML
I, [2015-06-07T19:52:48.741491 #1110] INFO -- : Rendered review/new.html.erb within layouts/application (24.3ms)
I, [2015-06-07T19:52:48.741798 #1110] INFO -- : Completed 500 Internal Server Error in 31ms (ActiveRecord: 0.0ms)
F, [2015-06-07T19:52:48.743409 #1110] FATAL -- :
ActionView::Template::Error (undefined method bootstrap_form_for' for #<#<Class:0x00000005798b28>:0x00000005782f80>):
13: <div class="row" style="background-color:#E6E6E6">
14: <div class="col-xs-6">
15: <h3 class="sub_section_header">Participant's Information</h3>
16: <%= bootstrap_form_for :review, url: { action: "create"} do |f| %>
17: <%= f.text_field :first_name, maxlength: 20, :required => true %><br>
18: <%= f.text_field :last_name, maxlength: 20, :required => true %><br>
19: <%= f.text_field :email_address, :required => true, :pattern => '[^@]+@[^@]+\.[a-zA-Z]{2,6}', help: "The email must have the form someone@example.com" %><br>
app/views/review/new.html.erb:16:in
appviewsreviewnewhtmlerb_89249576086572927645877860'

I think I have installed every gem correct. What could be the problem?

Also my review_controller.rb is:

code
```class ReviewController < ApplicationController
  def index
  end

  def new
    @review = Review.new

  end

  def create
    @review = Review.new

    @review.save
    redirect_to @review
  end

  def show
    @review = Review.find(params[:id])
  end

  private
    def review_params
      params.require(:review).permit(:date_of_attendance, :quality_of_speaker, :quality_of_venue, :comment, :first_name, :last_name, :email_address,
:company_name, :company_website)
    end
end

code

1 Answer

Hello,

It appears as though you have missed installing something. In line 16 of your template it's looking for the bootstrap_form_for function, but your application cannot find it. This is likely a function from a gem you have installed incorrectly or forgot.

I would review and double check you have installed all the gems you need, as this type of error is a strong indication you are missing one.

Have another answer? Share your knowledge.