I was trying to use Heroku to get my bot online 24/7, but there was a problem that my procfile is not recognized (at least I think that's it). I wrote in the procfile:
worker: npm start
however, I didn't see anything like it on Heroku's Dyno tab. If anyone can help me, my entire code is up here: https://github.com/Kasashii/FramedataGarotada
Rename the procfile to Procfile, as specified by Heroku documentation
Related
I recently changed an image on the landing page of my herokuapp built in rails. I realized that everything worked fine except that the landing page threw a 500 error. Upon some research I realized i should run RAILS_ENV=production bundle exec rake assets:precompile
After doing so, the images and some of the styling came back but some of it is still screwy and I cannot understand why.
I've read through just about every stackoverflow thread, the rails guide on the asset pipeline, and others but I can't get it to work. I've amended the files that need amending
as far as I know but nothing is working to make the styling revert to how it should be.
However, on the rails guide it notes that there are two caveats to locally precompile:
You must not run the Capistrano deployment task that precompiles
assets. You must change the following two application configuration
settings. In config/environments/development.rb, place the following
line:
config.assets.prefix = "/dev-assets"
I did the change within development.rb but I am not sure on how I can not run Capistrano. I dont think I'm doing that so maybe it's throwing some things off - idk, but each time I try to recompile now, the rake aborts. Any help is very much appreciated.
I tried using COMPILE_TIMEOUT: 6000 and even set heroku labs:enable user-env-compile but it didn't help
As far I can know, you cannot exceed the documented 15 minute limitation.
The simple answer is that no, you can't. At least I didn't find any evidence that it is possible.
The longer answer is that the Heroku way of doing it is by saving precompiled packages online and fetching them during the buildpack execution. To build binaries in dyno environment one should use vulcan. A good example of such usage can be found here, notice the two compilation scripts under support folder.
I'd like to run a Meteor.js app with the "spiderable" package on Heroku. Is there a buildpack or anything else to deploy it on Heroku? (PhantomJS in needed)
This buildpack (which I wrote) works with Meteor > 0.9.3 and includes phantomjs:
https://github.com/AdmitHub/meteor-buildpack-horse
I don't know how you're stuck with this, since in practice it's pretty straightforward to install an NPM module as shown in this guide. You only need to swap underscore in that example with phantomjs.
A very good buildpack to use is oortcloud's meteorite buildpack. I've used the meteor-only buildpack, but I've encountered way to many issues with it, but with the aforementioned I have had no problems with it so far.
As for the spiderable package, meteor add spiderable.
Fair warning though: running Meteor on Heroku requires alot of research on how to actually run your app, especially with providing correct environment variables. If you will have a problem with that, this would probably not a good place to discuss any of that.
On a side note: Next time, I implore you to be a little more clear about your problem and specify what your goals really are, and what have you tried so far. Seriously, who upvotes these things?
Our RoR app uses quite a few assets that need to be precompiled. It usually took several minutes for assets:precompile to run.
However recently something very strange happened: simple rake assets:precompile never ends (waited few hours).
I've found a workaround:
rake assets:precompile --trace
However it would be great to fix it anyways. Any ideas about a reason?
Does it take forever on your local machine or on the production server?
I had a similar thing when I deployed my app to a AWS micro instance. It took to much CPU and then AWS limits the cpu. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts_micro_instances.html
Now I precompile my assets locally and the problem is gone.
I had this same issue and came across this awesome gem (by Steve Agalloco) via a gist somewhere. Anyway, works a charm!
https://github.com/spagalloco/capistrano-local-precompile
I want to use Node.js as a Share.js server and Ruby for the frontend. As far as I know, Heroku only allows one web-facing process called "web". Does anyone have some experience trying to do something like this?
No, Heroku detects the application type when you push your code to Heroku and it compiles the slug. You'd need to have them as seperate applications with a defined API between the two (not always a bad thing)
UPDATE: You can 'stack' buildpacks these days, eg Ruby + PHP so you could have both executed. See https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app for how to use multiple buildpacks in the same app.
As a caveat, you technically can install two languages on a single app — but I'm not sure about running them concurrently. I made this buildpack to combine NodeJS and PHP (so that I could run Grunt during the slug compilation):
https://github.com/gcpantazis/heroku-buildpack-php-gruntjs
The language detection is usually fairly dumb; it'll be looking for a file indicative of the lang, i.e. index.php or a rakefile. You'll have to change the detect bin so that your code will pass.
Update:
Even better, consider using https://github.com/ddollar/heroku-buildpack-multi ; it'll let you install buildpacks sequentially. Depending on your application you might need to find language buildpacks that don't have verification steps, i.e. checking for a package.json file in a NodeJS app.
Yes, it is mostly possible I believe, as long as you're not doing something very tricky. I once deployed a Flask (Python) app that used Stanford's CoreNLP - which is all written in Java. You will need heroku-buildpack-multi.
After adding this, make sure to make a .buildbacks file and add all the buildpacks you will be needing from the Heroku github.
This circumvents Heroku detecting your app type itself and makes it install all necessary buildpacks from the .buildpacks file.