title: Rails problem in production mode, mysql database
body: <p>App is running smoothly in development mode, but deploying it onto a managed server brings up the public/500.html page <em>("We're sorry, but something went wrong")</em>, seemingly when content queries the mysql database. Putting up static content works, puzzlingly dynamic content only works locally in dev.</p>
  
  <p><em>rake db:migrate</em> went properly, I've manually inserted a test entry into the mysql database.</p>
  
  <p>Yet requesting the view results in 500 and the log gives</p>
  
  <pre><code>ActionView::Template::Error (NULL pointer given):
      10:  ...
      11:    &lt;% @projects.each do |project| %&gt;
      12:  ...        
  </code></pre>
  
  <p>Server runs MySQL 5.1.54, Rails has mysql gem installed.
  Any hints appreciated! </p>
  
  <p><strong>edit:</strong></p>
  
  <p>So I just started </p>
  
  <p><code>rails c production</code> </p>
  
  <p>on the remote server and created an entry in my "Client" model:</p>
  
  <p><code>irb(main):003:0&gt; c = Client.new
  =&gt; #&lt;Client id: nil, name: nil, permalink: nil, created_at: nil, updated_at: nil&gt;
  irb(main):004:0&gt; c.name = "realclient"
  =&gt; "realclient"
  irb(main):005:0&gt; c
  =&gt; #&lt;Client id: nil, name: "realclient", permalink: nil, created_at: nil, updated_at: nil&gt;
  irb(main):006:0&gt; c.save
  =&gt; true
  </code></p>
  
  <p>While all fields except for <em>name</em> are displayed empty in irb, the actual DB on the server show all repective fields okay:</p>
  
  <p><code>2  realclient  realclient  2011-04-22 13:59:12 2011-04-22 13:59:12</code>
  (id, name, permalink, created, updated)</p>
  
  <p>So bottom line: Active Record cannot receive values correctly from the DB that are actually there? </p>