title: Ruby on Rails - Completed 500 internal error on f.label
body: <p><strong>EDIT</strong></p>
  
  <p><strong>Here's the project on GitHub: <a href="https://github.com/lionelrudaz/myteam2" rel="nofollow">https://github.com/lionelrudaz/myteam2</a></strong></p>
  
  <hr>
  
  <p>I'm making my first application in Ruby on Rails by using the template on Railsapp (Twitter Bootstrap, Devise and CanCan).</p>
  
  <p>I've also made the necessary steps to publish my app to Heroku.</p>
  
  <p>Everything went fine so far, first publication on Heroku was alright, until I restarted the server on my MacBook Pro.</p>
  
  <p>Now I get always the default error page with message "We're sorry, but something went wrong."</p>
  
  <p>In the terminal, I get:</p>
  
  <pre><code>=&gt; Booting Thin
  =&gt; Rails 3.2.8 application starting in development on http://0.0.0.0:3000
  =&gt; Call with -d to detach
  =&gt; Ctrl-C to shutdown server
  &gt;&gt; Thin web server (v1.5.0 codename Knife)
  &gt;&gt; Maximum connections set to 1024
  &gt;&gt; Listening on 0.0.0.0:3000, CTRL+C to stop
  
  
  Started GET "/" for 127.0.0.1 at 2012-10-01 19:19:21 +0200
  Processing by HomeController#index as HTML
       User Load (0.3ms)  SELECT "users".* FROM "users" 
       Club Load (0.2ms)  SELECT "clubs".* FROM "clubs" ORDER BY "clubs"."id" DESC LIMIT 1
  Rendered home/index.html.erb within layouts/application (23.2ms)
  Completed 500 Internal Server Error in 190ms
  </code></pre>
  
  <p>Since I don't know how to disable the error page to get a real stack trace, I've started to remove lines of code by lines of code to find which line isn't working. Actually, it looks like the f.label instructions aren't working anymore. I know they did, I've used my app for a long time.</p>
  
  <p>Here's my home_controller.rb file</p>
  
  <pre><code>class HomeController &lt; ApplicationController
    def index
      @users = User.all
      @club = Club.last
    end
  end
  </code></pre>
  
  <p>index.html.erb</p>
  
  <pre><code>&lt;h3&gt;Home&lt;/h3&gt;
  
  &lt;%= debug @club %&gt;
  
  &lt;%= form_for @club do |f| %&gt;
  
    &lt;div class="control-group"&gt;
      &lt;%= RUBY_VERSION %&gt;
      &lt;%= Rails.version %&gt;
      &lt;%= f.label :name, :name %&gt;
      &lt;%= f.text_field :name %&gt;
    &lt;/div&gt;
  
   &lt;% end %&gt;
  
   &lt;% @users.each do |user| %&gt;
      &lt;p&gt;User: &lt;%=link_to user.name, user %&gt;&lt;/p&gt;
   &lt;% end %&gt;
  </code></pre>
  
  <p>The error is fired when I change</p>
  
  <pre><code> &lt;%= f.label :name, :name %&gt;
  </code></pre>
  
  <p>to </p>
  
  <pre><code> &lt;%= f.label :name %&gt;
  </code></pre>
  
  <p>I updated my app on Heroku so you can check the debug: <a href="http://myteam2.herokuapp.com/" rel="nofollow">http://myteam2.herokuapp.com/</a></p>
  
  <p>I don't know what's wrong, it's so basic that I feel so dumb.</p>
  
  <p>When I was investigating, I've remarked that the second argument of f.label must be a String. It's impossible to use the t() method to change the text of the email from a i18n file.</p>
  
  <p>I can't go ahead with my application and feel really frustrated. My Google researches haven't been successful.</p>
  
  <p>Let me know if you need more information.</p>
  
  <p>Cheers,</p>