oortcloud / heroku-buildpack-meteorite

MIT License
189 stars 97 forks source link

Couldn't get the leaderboard example to work #25

Open funkjunky opened 10 years ago

funkjunky commented 10 years ago

I first tried my own project and that failed terribly, so I decided to start simple by using meteor's leaderboard example, unfortunately there isn't much to go by on the README besides the create command, so i just tried to combine the instructions of meteor, heroku, and your readme:

meteor create --example leaderboard
cd leaderboard
git init
git add .meteor/
git add leaderboard.css
git add leaderboard.html
git add leaderboard.js
git commit -m "first"
heroku create meteorheroku2 --stack cedar --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite.git
heroku config:add ROOT_URL=http://meteorheroku2.herokuapp.com/
heroku config:add METEOR_SETTINGS='{}'
git push heroku master

The page served by "http://meteorheroku2.herokuapp.com/" says "Application Error"

gjolund commented 10 years ago

do you have meteorite installed in you dev environment?

funkjunky commented 10 years ago

I was in the wrong folder. I cd'd into the leaderboard directory and did the same things and everything got uploaded and setup without any errors. Now though, when i try to go to the page: http://meteorheroku2.herokuapp.com/ I get "Application Error". What is the next step in troubleshooting?

gjolund commented 10 years ago

make sure your heroku dyno is started and you should be good to go. Sometimes heroku will shutdown your dynos without warning, so if you receiving that error again just make sure the dyno is up and reload the page.

Also make sure that the buildpack created your MongoHQ instance and associated it with your application

funkjunky commented 10 years ago

I tried that to no avail. I looked at the logs:

/app/.meteor/heroku_build/app/programs/server/node_modules/fibers/fibers.js:13
throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibe
Error: `/app/.meteor/heroku_build/app/programs/server/node_modules/fibers/bin/linux-x64-v8-3.11/fibers.node` is missing. Try reinstalling `node-fibers`?
at Object.<anonymous> (/app/.meteor/heroku_build/app/programs/server/node_modules/fibers/fibers.js:13:8)
at ...

The same error is there twice, the second time when i ran ps:scale web=1.

At this point I'm not super desperate as I remembered that Meteor currently has free hosting, although I don't know for how long or how good the service will be =P, so eventually I'd like to move to an external host.

gjolund commented 10 years ago

The buildpacks can be a little finicky based on your dev environment...

If I were you I would look into deploy to meteor using the meteor deploy cli with the --password option.

That is how I deploy everything that I am currently working on, and I use a dns alias described here.

When I deploy to heroku I follow all of the steps in the buildpack manually so that I can debug and fix any errors that pop up during setup / deployment.

Since meteor is still in a state of flux I personally find that taking a few extra steps to observe the deployment saves you a LOT of time head scratching when things don't work right.

funkjunky commented 10 years ago

"When I deploy to heroku I follow all of the steps in the buildpack manually so that I can debug and fix any errors that pop up during setup / deployment."

What are all these steps? The only one I see that appears to be the important one is the heroku create one. I know you've already written a lot for me, and I appreciate it, but could you possibly write a line by line of the commands you write to deploy your app to heroku, including any configure file changes that may be necessary (like procfile perhaps?).

Thanks!

gjolund commented 10 years ago

@funkjunky I can't do it this minute b/c I'm pretty swamped at work, but I've been meaning to update my buildpack for meteor 0.6.6 anyways. Follow my fork of this repo and you'll get an update when I'm done.

I'm kind of OCD about documentation too, and since my whole team uses my buildpack I'll be sure to keep it updated.

funkjunky commented 10 years ago

Okey doke. I look forward to seeing your additions. Again, thanks for your help and good luck on your current project!

gjolund commented 10 years ago

likewise :)

On Oct 14, 2013, at 2:16 PM, Jason McCarrell notifications@github.com wrote:

Okey doke. I look forward to seeing your additions. Again, thanks for your help and good luck on your current project!

— Reply to this email directly or view it on GitHub.

nleush commented 10 years ago

+1 I have same issue

bmozza commented 10 years ago

+1 more, any help would be appreciated

alprestedge commented 10 years ago

+1 pretty please :D

tmeasday commented 10 years ago

@austinrivas - are you actively maintaining your buildpack?

Would you like to take this one over, or shall I change it to point to yours? It's been some time since I've used heroku with Meteor.

hughhopkins commented 10 years ago

+1 having the same issue

gjolund commented 10 years ago

@tmeasday I'm updating my buildpack on a per need basis right now, so I wouldn't feel comfortable taking over the project at this time. Also my all of my changes are in a private repo as I still have some sensitive config data in there that I haven't generalized yet.

That being said I do plan on deploying a demo of a product I'm working on to heroku in the near future and will take that opportunity to update it if someone else hasn't already.

@tmeasday what are you currently using to deploy meteor apps?

tmeasday commented 10 years ago

@austinrivas - I'm using a custom AWS setup for larger apps and meteor deploy for smaller ones.

sacketty commented 10 years ago

I had the same issue. (with Meteor 0.6.6.2) After checking the log, it turns out that meteor by default was using node v 0.8.24 while this version of meteor requires 0.10.+ so I created a simple package.json file in my root directory { "name": "Hello-Me", "version": "0.0.1", "engines": { "node": "0.10.21" } } Unfortunately I got a new issue with npm version (my local version is 1.3.7). so finally here is my workaround: 1°) I downgraded meteor to 0.6.5 2°) I changed my package.json file to have "node": "0.8.24" 3°) I depolyed the application on Heroku (went juste fine)

for now, I can't use 0.6.6.2

artpolikarpov commented 10 years ago

+1

sacketty commented 10 years ago

resolved with merge #27 from areed

paralin commented 10 years ago

This should be fixed in #32

paralin commented 10 years ago

This should work now without any package.json file (it is ignored for now)