Note that there are some explanatory texts on larger screens.

plurals
  1. PORails error 500 on local mac
    text
    copied!<p>Ok, I'm a noob with rails... so I just set up rails with RVM and created a new project, and when I try to visit a newly created view I'm getting an error 500.</p> <p>Heres my setup:</p> <ul> <li>OSX 10.6.5</li> <li>Installed MySQL 64bit</li> <li>RVM installed ruby 1.8.7 and rails 2.3.8 (no other rails or ruby except for the system ruby) <code>rvm install 1.8.7</code>, <code>rvm use --create 1.8.7@rails2</code>, <code>gem install rails -v=2.3.8</code></li> <li>Passenger with Apache <code>gem install passenger</code>, <code>rvmsudo passenger-install-apache2-module</code></li> <li>Passenger preference pane</li> <li>Turned on websharing</li> </ul> <p>I then proceeded to setup a rails project in my development folder called testapp, added it in the passenger preference pane, and then ran <code>script/generate controller Say</code>, defined an action hello, and then created a view in the app/view/say folder called hello.</p> <p>Now I'm getting a 500 error when visiting myapp.local/say/hello, what am i doing wrong?</p> <hr> <p><strong>UPDATE:</strong></p> <p>I checked the logs and also tried running using WEBrick instead of passenger and apache. I got thrown back the same errors. I don't think I should post the entire log, should I? But the first error is </p> <blockquote> <p>no such file to load -- sqlite3</p> </blockquote> <p>I have not yet setup a db, I was going to use mysql, but I didn't want to install it since I'm not using models yet. Is it a requirement?</p> <hr> <p><strong>UPDATE 2:</strong></p> <p>So I installed the mysql gem with <code>gem install mysql -- --include=/usr/local/lib</code> (not sure if this is right). I then created a rails app with <code>rails -d mysql myapp</code>. And set the password in the database.yml. I'm getting a new error now:</p> <blockquote> <p>Unknown database 'myapp_development'</p> </blockquote> <p>So I have to create a database. Why am I being forced to create a db at all?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload