On Mon, May 23, 2011 at 3:41 AM, Brandon G. <b.a.gerke / gmail.com> wrote:
> All I'm trying to do is deploy an app I made using Heroku, because it
> seemed simple enough when I read the instructions on various sites
> explaining how to do this.
>
> 1.)Make a heroku account and install it
> 2.)Make a config.ru file in the root directory of the project containing
>
> require 'movies' #movies is the name of my app
> run Sinatra::Application
>
> 3.)Create the app on Heroku ($ heroku create)
> 4.) Use git and push the app to Heroku ($ git push heroku master)
>
> I do all of this, and my app is being pushed to Heroku, but all I get is
> an application error when I load the URL in a browser. So I run $ heroku
> logs, and just get something telling me that it crashed, not giving me a
> clue as to why. I was starting to think maybe it had to do with the
> database? So I decided to try deploying a simple "hello world" app using
> these same steps and I get the exact same error. What am I missing here?
> I even tried using Bundler to make sure it gets all the required gems.
>
> Link to github repository is https://github.com/bgerke/Ruby-Project for
> anyone who is interested in helping me.
>
> Attachments:
> http://www.ruby-forum.com/attachment/6218/Ruby-Project.zip
>
>
> --
> Posted via http://www.ruby-forum.com/.
>
>


Your logs say: "2011-05-23T08:31:50+00:00 app[web.1]:
<internal:lib/rubygems/custom_require>:29:in `require': no such file
to load -- movies (LoadError)"

On Ruby < 1.9.2, the current directory is part of the path, so if you
run the app from the app's directory, it will happen to find the
movies file. But this behaviour is unreliable, so in 1.9.2, they
removed the current directory from the path. This means you need to
either be explicit about the location of the file, or alter the path
to include your app's directory.
The easiest solution os to change `require "movies"` to `require
File.dirname(__FILE__)+"/movies"`

Additionally, looking at your source code, you have another issue that
will come up. You are not actually using Bundler. You need to put
`require 'bundler/setup'` before you require any of your gems.

I also see that Datamapper is not in your Gemfile. You don't notice
this problem, because your app isn't loading bundler. As soon as you
fix that, it will become apparent.