Application Error Heroku deploying with meteor JS - meteor

Hi my meteor js app is showing the following:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
Here is the commands I ran (by following a tutorial, to get deployed thus far):
heroku create mkrteach
heroku addons:create mongolab
heroku config:set ROOT_URL=https://mkrteach.herokuapp.com/
git push heroku master
Here is what my heroku logs are showing:
2017-05-24T23:43:20.191506+00:00 app[api]: Enable Logplex by user
mohammadhunan#gmail.com
2017-05-24T23:43:20.191506+00:00 app[api]: Release v2 created by user mohammadhunan#gmail.com
2017-05-24T23:43:20.019249+00:00 app[api]: Release v1 created by user mohammadhunan#gmail.com
2017-05-24T23:43:20.019249+00:00 app[api]: Initial release by user mohammadhunan#gmail.com
2017-05-24T23:43:43.106898+00:00 app[api]: Attach MONGODB (#ref:mongolab-round-29311) by user mohammadhunan#gmail.com
2017-05-24T23:43:43.106898+00:00 app[api]: Release v3 created by user mohammadhunan#gmail.com
2017-05-24T23:44:21.663825+00:00 app[api]: Release v4 created by user mohammadhunan#gmail.com
2017-05-24T23:44:21.663825+00:00 app[api]: Set ROOT_URL config vars by user mohammadhunan#gmail.com
2017-05-24T23:44:32.978581+00:00 app[api]: Release v5 created by user mohammadhunan#gmail.com
2017-05-24T23:44:32.978581+00:00 app[api]: Set METEOR_SETTINGS config vars by user mohammadhunan#gmail.com
2017-05-24T23:44:50.000000+00:00 app[api]: Build started by user mohammadhunan#gmail.com
2017-05-24T23:46:56.713557+00:00 app[api]: Deploy 9e5efce2 by user mohammadhunan#gmail.com
2017-05-24T23:46:56.713557+00:00 app[api]: Release v6 created by user mohammadhunan#gmail.com
2017-05-24T23:46:56.746656+00:00 app[api]: Scaled to web#1:Free by user mohammadhunan#gmail.com
2017-05-24T23:44:50.000000+00:00 app[api]: Build succeeded
2017-05-24T23:47:04.554518+00:00 heroku[web.1]: Starting process with command `.meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js`
2017-05-24T23:47:07.867019+00:00 heroku[web.1]: Process exited with status 8
2017-05-24T23:47:07.886082+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-24T23:47:07.887443+00:00 heroku[web.1]: State changed from crashed to starting
2017-05-24T23:47:07.715326+00:00 app[web.1]:
2017-05-24T23:47:07.715736+00:00 app[web.1]: /app/.meteor/heroku_build/app/programs/server/mini-files.js:82
2017-05-24T23:47:07.716081+00:00 app[web.1]: const unicodeNormalizePath = (path) => {
2017-05-24T23:47:07.716147+00:00 app[web.1]: ^
2017-05-24T23:47:07.741911+00:00 app[web.1]: SyntaxError: Unexpected token >
2017-05-24T23:47:07.741913+00:00 app[web.1]: at Module._compile (module.js:439:25)
2017-05-24T23:47:07.741914+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2017-05-24T23:47:07.741915+00:00 app[web.1]: at Module.load (module.js:356:32)
2017-05-24T23:47:07.741915+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2017-05-24T23:47:07.741916+00:00 app[web.1]: at Module.require (module.js:364:17)
2017-05-24T23:47:07.741917+00:00 app[web.1]: at require (module.js:380:17)
2017-05-24T23:47:07.741918+00:00 app[web.1]: at Object.<anonymous> (/app/.meteor/heroku_build/app/programs/server/boot.js:9:13)
2017-05-24T23:47:07.741918+00:00 app[web.1]: at Module._compile (module.js:456:26)
2017-05-24T23:47:07.741919+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2017-05-24T23:47:07.741919+00:00 app[web.1]: at Module.load (module.js:356:32)
2017-05-24T23:47:12.921976+00:00 heroku[web.1]: Starting process with command `.meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js`
2017-05-24T23:47:14.666363+00:00 app[web.1]: /app/.meteor/heroku_build/app/programs/server/mini-files.js:82
2017-05-24T23:47:14.665865+00:00 app[web.1]:
2017-05-24T23:47:14.672056+00:00 app[web.1]: at Module._compile (module.js:439:25)
2017-05-24T23:47:14.666824+00:00 app[web.1]: ^
2017-05-24T23:47:14.672057+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2017-05-24T23:47:14.666765+00:00 app[web.1]: const unicodeNormalizePath = (path) => {
2017-05-24T23:47:14.672054+00:00 app[web.1]: SyntaxError: Unexpected token >
2017-05-24T23:47:14.672058+00:00 app[web.1]: at Module.load (module.js:356:32)
2017-05-24T23:47:14.672058+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2017-05-24T23:47:14.672059+00:00 app[web.1]: at Module.require (module.js:364:17)
2017-05-24T23:47:14.672059+00:00 app[web.1]: at require (module.js:380:17)
2017-05-24T23:47:14.672060+00:00 app[web.1]: at Object.<anonymous> (/app/.meteor/heroku_build/app/programs/server/boot.js:9:13)
2017-05-24T23:47:14.672062+00:00 app[web.1]: at Module.load (module.js:356:32)
2017-05-24T23:47:14.672061+00:00 app[web.1]: at Module._compile (module.js:456:26)
2017-05-24T23:47:14.672061+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2017-05-24T23:47:14.751083+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-24T23:47:14.731102+00:00 heroku[web.1]: Process exited with status 8
2017-05-24T23:47:27.649678+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mkred-teach.herokuapp.com request_id=ee6e0ca4-3bee-48ae-925a-562d23e47dd7 fwd="208.185.23.206" dyno= connect= service= status=503 bytes= protocol=https
2017-05-24T23:47:28.143232+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mkred-teach.herokuapp.com request_id=5c736339-3336-4c8a-986a-ae572f99a441 fwd="208.185.23.206" dyno= connect= service= status=503 bytes= protocol=https
Mohammads-MacBook-Pro:mkrED2 minimoe$
I'm not sure how to fix this, can anyone tell me how to fix this?

I encountered the same problem. It seems the Heroku buildpack you are using no longer works. Change the buildpack to a newer one. This one is working: https://github.com/AdmitHub/meteor-buildpack-horse.git.
To change your buildpack you can use the dashboard or the command-line.
Via Dashboard
Go to your Heroku dashboard and select your app
Go to the Settings tab and find Buildpacks section
Remove the existing buildpack and add the new one
Via command-line
Find out which buildpack you are using, with
heroku buildpacks
Copy the link to the old buildpack's git repo.
heroku config:unset REPLACE_WITH_OLD_BUILDPACK_LINK
heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
Whatever method you use, you'll have to push an update with git push heroku master to rebuild the app.

Related

Rails 7 No loader is configured for ".coffee" files:

I have an older app I am transitioning to Rails 7. I created a new app and Im essentially putting the gemfiles, controllers, models, and views that I used on the previous app. I keep seeing this error when I run $rails assets:precompile and I have the coffee gem for rails installed (comes preinstalled) but it list all my coffee files and says a loader is not configured. How do I configure a loader and where am I placing the file to load?
#terminal
rails assets:precompile
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.10s.
yarn run v1.22.19
$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/coupon.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/bills.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/welcome.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/landing.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/dashboard.js.coffee
✘ [ERROR] Could not resolve "controllers/application"
app/javascript/controllers/index.js:3:28:
3 │ import { application } from "controllers/application"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "controllers/application" as external to exclude it from the bundle, which
will remove this error.
6 of 7 errors shown (disable the message limit with --log-limit=0)
node:child_process:879
throw err;
^
Error: Command failed: /Users/Public/code/LDv1.1/node_modules/esbuild-darwin-64/bin/esbuild app/javascript/application.js app/javascript/bills.js.coffee app/javascript/coupon.js.coffee app/javascript/dashboard.js.coffee app/javascript/landing.js.coffee app/javascript/rails.validations.js app/javascript/welcome.js.coffee --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
at checkExecSyncError (node:child_process:841:11)
at Object.execFileSync (node:child_process:876:15)
at Object.<anonymous> (/Users/Public/code/LDv1.1/node_modules/esbuild/bin/esbuild:177:28)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 9665,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
rails aborted!
jsbundling-rails: Command build failed, ensure yarn is installed and `yarn build` runs without errors
Tasks: TOP => assets:precompile => javascript:build
(See full trace by running task with --trace)
P.S. When I run yarn build as the terminal says I get this error...
yarn build
yarn run v1.22.19
$ esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/welcome.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/bills.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/landing.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/coupon.js.coffee
✘ [ERROR] No loader is configured for ".coffee" files: app/javascript/dashboard.js.coffee
✘ [ERROR] Could not resolve "controllers/application"
app/javascript/controllers/index.js:3:28:
3 │ import { application } from "controllers/application"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "controllers/application" as external to exclude it from the bundle, which
will remove this error.
6 of 7 errors shown (disable the message limit with --log-limit=0)
node:child_process:879
throw err;
^
Error: Command failed: /Users/Public/code/LDv1.1/node_modules/esbuild-darwin-64/bin/esbuild app/javascript/application.js app/javascript/bills.js.coffee app/javascript/coupon.js.coffee app/javascript/dashboard.js.coffee app/javascript/landing.js.coffee app/javascript/rails.validations.js app/javascript/welcome.js.coffee --bundle --sourcemap --outdir=app/assets/builds --public-path=assets
at checkExecSyncError (node:child_process:841:11)
at Object.execFileSync (node:child_process:876:15)
at Object.<anonymous> (/Users/Public/code/LDv1.1/node_modules/esbuild/bin/esbuild:177:28)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 10205,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

kubernetes nginx upstream server as service not found

These are my yaml files referenced by here (kubernetes.io/docs)
deployment gists
And I use command kubectl apply -f backend-deployment.yaml -f frontend-configmap.yaml -f frontend-deployment.yaml
Backend were launched successfully, but Frontend occured error.
[emerg] 1#1: host not found in upstream "backend-service" in /etc/nginx/conf.d/nginx.conf:2
#nginx: [emerg] host not found in upstream "backend-service" in /etc/nginx/conf.d/nginx.conf:2
Even if 'backend-service' is declared, nginx couldn't recognize it.
Command nslookup backend-service result is:
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find backend-service: SERVFAIL
What am I missing?
I have gotten closer to the issue/solution.
First of all, you if the images in your supplied answer are correct, you are running nginx in your backend deployment and node-js server on your frontend deployment. This is a mistake.
after changing the images frontend is running (as expected) but backend pod is crashing.
However, the backend pod is successfully resolving the mysql-service to its internal clusterIp and I appear to have wrong authentication setup.
`> server#1.0.0 start /usr/src/app
> node backend.js
(node:18) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:18) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:18) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
listening on 3000
events.js:292
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 10.100.77.32:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16)
--------------------
at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/usr/src/app/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/usr/src/app/backend.js:58:12)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/usr/src/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Handshake.<anonymous> (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:153:12)
at Handshake.emit (events.js:315:20)
at Handshake.Sequence.end (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:12)
at Protocol.handleNetworkError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:369:14)
at Connection._handleNetworkError (/usr/src/app/node_modules/mysql/lib/Connection.js:418:18)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:96:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '10.100.77.32',
port: 3306,
> node backend.js
fatal: true
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#1.0.0 start: `node backend.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-21T08_46_32_833Z-debug.log`
if you look at the log. it says it tries to connect to 10.100.77.32:3306 and the output of kubectl get svc is the following mysql-service ClusterIP 10.100.77.32 <none> 3306/TCP 17m
with the matching ip of my service.
kubectl get endpoints shows that the mysql-service has indeed found an endpoint:
mysql-service ClusterIP 10.100.77.32 <none> 3306/TCP 17m
and here is additional log information showing that the authentication mechanism of your nodejs application appearently is not working for the mysql pod.
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Handshake.ErrorPacket (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
at Protocol._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/usr/src/app/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:88:28)
at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:296:12)
at readableAddChunk (_stream_readable.js:272:9)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
--------------------
at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/usr/src/app/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/usr/src/app/backend.js:58:12)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/usr/src/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Handshake.<anonymous> (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:153:12)
at Handshake.emit (events.js:315:20)
at Handshake.Sequence.end (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:12)
at Handshake.ErrorPacket (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:125:8)
at Protocol._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
[... lines matching original stack trace ...]
at readableAddChunk (_stream_readable.js:272:9) {
code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
sqlState: '08004',
fatal: true
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#1.0.0 start: `node backend.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-21T08_55_22_133Z-debug.log
However, with the changes suggest at the beginning of the answer the issues around resolving the service name and communicating inside of kubernetes should be resolved.
backend-deployment image : bateaux/test-nginx
frontend-deployment image : bateaux/test-node-server
When deploy backend-deployment, remove [livenessProbe, readinessProbe].
Because node.js express server use #cloudnative/health-connect To readinessProbe, so call PingCheck(worker node ip).
Wow....I found solution for getaddrinfo EAI_AGAIN mysql-service.
I think if network can't find service, there is error in dns.
kubectl logs --namespace=kube-system -l k8s-app=kube-dns
Result of command is gist.
So...I finally found this link about kubernetes coredns.
By belphegor's answer, it works restart coredns.
Although, there is new error Client does not support authentication protocol requested by server; consider upgrading MySQL client, but i think to solve it is easier than dns error. hhhhhhhhhhhhhhhh

Issue deploying rails app on heroku

I am new to rails and I was to work on a code. The website works perfect on my local but when deploying remotely on heroku, the css files seem not found.
I am running the app with ruby 2.4, Rails 5.0 and gemfile
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
gem 'autoprefixer-rails'
gem 'font-awesome-rails', '~> 4.6', '>= 4.6.3.1'
gem 'animate-rails', '~> 1.0', '>= 1.0.10'
gem 'owlcarousel-rails', '~> 1.1', '>= 1.1.3.3'
gem 'wow-rails', '~> 0.0.1'
gem 'magnific-popup-rails', '~> 1.1'
gem 'google-api-client', '~> 0.12.0'
gem 'figaro'
# cron task
gem 'whenever', require: false
# Authentication
gem 'devise'
gem 'cancancan', '~> 1.15'
# serach and autocompletion
gem 'pg_search'
# mailer dev
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.3'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails', '~> 5.0'
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
#gem 'capistrano3-puma', github: "seuros/capistrano-puma"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# Use Capistrano for deployment
gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano-rvm'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
ruby "2.4.1"
Here's the log via the command heroku log --tail
2017-11-16T16:07:52.898937+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 6818 -e production`
2017-11-16T16:07:58.371812+00:00 app[web.1]: => Booting Puma
2017-11-16T16:07:58.371821+00:00 app[web.1]: => Rails 5.0.6 application starting in production on http://0.0.0.0:6818
2017-11-16T16:07:58.371822+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-11-16T16:07:58.371822+00:00 app[web.1]: Puma starting in single mode...
2017-11-16T16:07:58.371827+00:00 app[web.1]: * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
2017-11-16T16:07:58.371828+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-11-16T16:07:58.371828+00:00 app[web.1]: * Environment: production
2017-11-16T16:07:58.371978+00:00 app[web.1]: * Listening on tcp://0.0.0.0:6818
2017-11-16T16:07:58.372379+00:00 app[web.1]: Use Ctrl-C to stop
2017-11-16T16:07:58.939021+00:00 heroku[web.1]: State changed from starting to up
2017-11-16T16:07:59.757157+00:00 app[web.1]: I, [2017-11-16T16:07:59.757044 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Started GET "/" for 80.12.27.252 at 2017-11-16 16:07:59 +0000
2017-11-16T16:07:59.766621+00:00 app[web.1]: I, [2017-11-16T16:07:59.766547 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Rendering pages/index.html.erb within layouts/application
2017-11-16T16:07:59.763739+00:00 app[web.1]: I, [2017-11-16T16:07:59.763642 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Processing by PagesController#index as HTML
2017-11-16T16:07:59.767481+00:00 app[web.1]: I, [2017-11-16T16:07:59.767416 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Rendered pages/index.html.erb within layouts/application (0.7ms)
2017-11-16T16:07:59.936841+00:00 app[web.1]: I, [2017-11-16T16:07:59.936713 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Rendered layouts/_nav.html.erb (0.4ms)
2017-11-16T16:07:59.941558+00:00 app[web.1]: I, [2017-11-16T16:07:59.941458 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Rendered layouts/_footer.html.erb (4.1ms)
2017-11-16T16:07:59.941919+00:00 app[web.1]: I, [2017-11-16T16:07:59.941858 #4] INFO -- : [b03307de-5170-474a-9f27-50cd05bf07a3] Completed 200 OK in 178ms (Views: 177.2ms)
2017-11-16T16:07:59.942814+00:00 heroku[router]: at=info method=GET path="/" host=mysterious-crag-68857.herokuapp.com request_id=b03307de-5170-474a-9f27-50cd05bf07a3 fwd="80.12.27.252" dyno=web.1 connect=0ms service=190ms status=200 bytes=14894 protocol=https
2017-11-16T16:08:00.224613+00:00 heroku[router]: at=info method=GET path="/assets/application-cbd352f84234371962220aac536e7439e570099d31857c088b4e6d82141e9206.css" host=mysterious-crag-68857.herokuapp.com request_id=d2c6dfd6-4660-4844-9d44-143e3d21b917 fwd="80.12.27.252" dyno=web.1 connect=5ms service=10ms status=200 bytes=290 protocol=https
2017-11-16T16:08:00.469689+00:00 heroku[router]: at=info method=GET path="/assets/fondation_pierre_fabre.png" host=mysterious-crag-68857.herokuapp.com request_id=c7adcbdd-8478-4916-9aff-0a90a52058bc fwd="80.12.27.252" dyno=web.1 connect=0ms service=8ms status=200 bytes=3889 protocol=https
2017-11-16T16:08:00.354457+00:00 heroku[router]: at=info method=GET path="/assets/logo2.png" host=mysterious-crag-68857.herokuapp.com request_id=720bf865-6dc4-401f-aac2-bf8eb96c5e90 fwd="80.12.27.252" dyno=web.1 connect=0ms service=5ms status=200 bytes=15746 protocol=https
2017-11-16T16:08:00.331984+00:00 heroku[router]: at=info method=GET path="/assets/application-7a19b05aebcc1264ba7bc75e8a9ab79af4669370f312952095c90b8160480841.js" host=mysterious-crag-68857.herokuapp.com request_id=c58820a6-ce78-43d8-b9da-f188ab36a9d4 fwd="80.12.27.252" dyno=web.1 connect=0ms service=3ms status=200 bytes=303 protocol=https
2017-11-16T16:08:00.351225+00:00 app[web.1]: I, [2017-11-16T16:08:00.351111 #4] INFO -- : [720bf865-6dc4-401f-aac2-bf8eb96c5e90] Started GET "/assets/logo2.png" for 80.12.27.252 at 2017-11-16 16:08:00 +0000
2017-11-16T16:08:00.464437+00:00 app[web.1]: I, [2017-11-16T16:08:00.464337 #4] INFO -- : [62f2a2a3-392b-446d-be9b-a32e38f68397] Started GET "/assets/single_folio/featured1.jpg" for 80.12.27.252 at 2017-11-16 16:08:00 +0000
2017-11-16T16:08:00.465587+00:00 app[web.1]: I, [2017-11-16T16:08:00.464658 #4] INFO -- : [c7adcbdd-8478-4916-9aff-0a90a52058bc] Started GET "/assets/fondation_pierre_fabre.png" for 80.12.27.252 at 2017-11-16 16:08:00 +0000
2017-11-16T16:08:00.582164+00:00 app[web.1]: I, [2017-11-16T16:08:00.582059 #4] INFO -- : [2c5ed467-5129-4e52-9794-c22a611efaec] Started GET "/assets/logo_altran.png" for 80.12.27.252 at 2017-11-16 16:08:00 +0000
2017-11-16T16:08:00.480539+00:00 heroku[router]: at=info method=GET path="/assets/single_folio/featured1.jpg" host=mysterious-crag-68857.herokuapp.com request_id=62f2a2a3-392b-446d-be9b-a32e38f68397 fwd="80.12.27.252" dyno=web.1 connect=1ms service=19ms status=200 bytes=230727 protocol=https
2017-11-16T16:08:00.628238+00:00 heroku[router]: at=info method=GET path="/assets/home/build.jpg" host=mysterious-crag-68857.herokuapp.com request_id=f9d88aa4-d176-4190-8ad7-08f15cffc6fd fwd="80.12.27.252" dyno=web.1 connect=0ms service=7ms status=200 bytes=19242 protocol=https
2017-11-16T16:08:00.584670+00:00 heroku[router]: at=info method=GET path="/assets/logo_altran.png" host=mysterious-crag-68857.herokuapp.com request_id=2c5ed467-5129-4e52-9794-c22a611efaec fwd="80.12.27.252" dyno=web.1 connect=0ms service=4ms status=200 bytes=8918 protocol=https
2017-11-16T16:08:00.623571+00:00 app[web.1]: I, [2017-11-16T16:08:00.623424 #4] INFO -- : [f9d88aa4-d176-4190-8ad7-08f15cffc6fd] Started GET "/assets/home/build.jpg" for 80.12.27.252 at 2017-11-16 16:08:00 +0000
2017-11-16T16:08:01.911423+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mysterious-crag-68857.herokuapp.com request_id=69791277-1eb3-4067-a23a-51987305595b fwd="80.12.27.252" dyno=web.1 connect=1ms service=1ms status=200 bytes=180 protocol=https
2017-11-16T16:08:04.306986+00:00 heroku[router]: at=info method=GET path="/assets/application-cbd352f84234371962220aac536e7439e570099d31857c088b4e6d82141e9206.css" host=mysterious-crag-68857.herokuapp.com request_id=9d090e84-2bfe-49d8-afe1-7a5769d84497 fwd="80.12.27.252" dyno=web.1 connect=1ms service=5ms status=304 bytes=48 protocol=https
2017-11-16T16:12:50.000000+00:00 app[api]: Build started by user benchoufi.mehdi#gmail.com
2017-11-16T16:13:08.103929+00:00 heroku[web.1]: Restarting
2017-11-16T16:13:08.116568+00:00 heroku[web.1]: State changed from up to starting
2017-11-16T16:13:07.390096+00:00 app[api]: Release v7 created by user benchoufi.mehdi#gmail.com
2017-11-16T16:13:07.390096+00:00 app[api]: Deploy 99038abe by user benchoufi.mehdi#gmail.com
2017-11-16T16:12:50.000000+00:00 app[api]: Build succeeded
2017-11-16T16:13:08.751218+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-11-16T16:13:08.761369+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-11-16T16:13:08.788899+00:00 app[web.1]: Exiting
2017-11-16T16:13:08.789433+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:395:in `close': stream closed (IOError)
2017-11-16T16:13:08.789487+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:398:in `handle_servers'
2017-11-16T16:13:08.789453+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:395:in `ensure in handle_servers'
2017-11-16T16:13:08.789489+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/server.rb:327:in `block in run'
2017-11-16T16:13:08.907475+00:00 heroku[web.1]: Process exited with status 1
2017-11-16T16:13:13.745852+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 5997 -e production`
2017-11-16T16:13:22.652430+00:00 heroku[web.1]: State changed from starting to up
2017-11-16T16:13:22.424108+00:00 app[web.1]: => Booting Puma
2017-11-16T16:13:22.424142+00:00 app[web.1]: => Rails 5.0.6 application starting in production on http://0.0.0.0:5997
2017-11-16T16:13:22.424145+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-11-16T16:13:22.424195+00:00 app[web.1]: Puma starting in single mode...
2017-11-16T16:13:22.424286+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-11-16T16:13:22.424247+00:00 app[web.1]: * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
2017-11-16T16:13:22.424352+00:00 app[web.1]: * Environment: production
2017-11-16T16:13:22.424528+00:00 app[web.1]: * Listening on tcp://0.0.0.0:5997
2017-11-16T16:13:22.425055+00:00 app[web.1]: Use Ctrl-C to stop
2017-11-16T16:13:57.966340+00:00 app[web.1]: I, [2017-11-16T16:13:57.966187 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Started GET "/" for 80.12.27.252 at 2017-11-16 16:13:57 +0000
2017-11-16T16:13:58.001708+00:00 app[web.1]: I, [2017-11-16T16:13:58.001639 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Rendered pages/index.html.erb within layouts/application (0.9ms)
2017-11-16T16:13:57.996269+00:00 app[web.1]: I, [2017-11-16T16:13:57.996152 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Processing by PagesController#index as HTML
2017-11-16T16:13:58.000897+00:00 app[web.1]: I, [2017-11-16T16:13:58.000568 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Rendering pages/index.html.erb within layouts/application
2017-11-16T16:13:58.296994+00:00 app[web.1]: I, [2017-11-16T16:13:58.296906 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Completed 200 OK in 301ms (Views: 299.3ms)
2017-11-16T16:13:58.286219+00:00 app[web.1]: I, [2017-11-16T16:13:58.286073 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Rendered layouts/_nav.html.erb (0.7ms)
2017-11-16T16:13:58.296500+00:00 app[web.1]: I, [2017-11-16T16:13:58.296376 #4] INFO -- : [e8dd584a-d608-4421-ac81-44cd455ed936] Rendered layouts/_footer.html.erb (9.3ms)
2017-11-16T16:13:58.290239+00:00 heroku[router]: at=info method=GET path="/" host=mysterious-crag-68857.herokuapp.com request_id=e8dd584a-d608-4421-ac81-44cd455ed936 fwd="80.12.27.252" dyno=web.1 connect=0ms service=348ms status=200 bytes=14894 protocol=https
2017-11-16T16:13:58.571091+00:00 heroku[router]: at=info method=GET path="/assets/application-cbd352f84234371962220aac536e7439e570099d31857c088b4e6d82141e9206.css" host=mysterious-crag-68857.herokuapp.com request_id=92a4edc0-7f6f-4317-b7b8-7ea7e202aff4 fwd="80.12.27.252" dyno=web.1 connect=0ms service=4ms status=200 bytes=290 protocol=https
2017-11-16T16:13:58.704480+00:00 heroku[router]: at=info method=GET path="/assets/application-7a19b05aebcc1264ba7bc75e8a9ab79af4669370f312952095c90b8160480841.js" host=mysterious-crag-68857.herokuapp.com request_id=db83d660-cedf-4642-972c-1d2b4e08d156 fwd="80.12.27.252" dyno=web.1 connect=0ms service=3ms status=200 bytes=303 protocol=https
2017-11-16T16:13:58.832979+00:00 heroku[router]: at=info method=GET path="/assets/logo2.png" host=mysterious-crag-68857.herokuapp.com request_id=16ea7daf-d704-43f0-a8ce-91243a15b8f3 fwd="80.12.27.252" dyno=web.1 connect=0ms service=26ms status=200 bytes=15746 protocol=https
2017-11-16T16:13:58.817763+00:00 app[web.1]: I, [2017-11-16T16:13:58.817635 #4] INFO -- : [16ea7daf-d704-43f0-a8ce-91243a15b8f3] Started GET "/assets/logo2.png" for 80.12.27.252 at 2017-11-16 16:13:58 +0000
2017-11-16T16:13:59.035120+00:00 app[web.1]: I, [2017-11-16T16:13:59.035020 #4] INFO -- : [7191af72-e7a6-4c9f-b34d-f866349e19fe] Started GET "/assets/single_folio/featured1.jpg" for 80.12.27.252 at 2017-11-16 16:13:59 +0000
2017-11-16T16:13:59.038959+00:00 heroku[router]: at=info method=GET path="/assets/single_folio/featured1.jpg" host=mysterious-crag-68857.herokuapp.com request_id=7191af72-e7a6-4c9f-b34d-f866349e19fe fwd="80.12.27.252" dyno=web.1 connect=0ms service=18ms status=200 bytes=230727 protocol=https
2017-11-16T16:13:59.146207+00:00 heroku[router]: at=info method=GET path="/assets/fondation_pierre_fabre.png" host=mysterious-crag-68857.herokuapp.com request_id=f54b3701-44ae-4d9c-b76a-200a5be5f4f7 fwd="80.12.27.252" dyno=web.1 connect=0ms service=18ms status=200 bytes=3889 protocol=https
2017-11-16T16:13:59.137862+00:00 app[web.1]: I, [2017-11-16T16:13:59.137756 #4] INFO -- : [b5620bf1-cd26-430e-bdc4-4b18d283d602] Started GET "/assets/logo_altran.png" for 80.12.27.252 at 2017-11-16 16:13:59 +0000
2017-11-16T16:13:59.152893+00:00 app[web.1]: I, [2017-11-16T16:13:59.152788 #4] INFO -- : [f54b3701-44ae-4d9c-b76a-200a5be5f4f7] Started GET "/assets/fondation_pierre_fabre.png" for 80.12.27.252 at 2017-11-16 16:13:59 +0000
2017-11-16T16:13:59.158096+00:00 app[web.1]: I, [2017-11-16T16:13:59.158011 #4] INFO -- : [19624a74-80a0-4796-b349-47e1a359291a] Started GET "/assets/home/build.jpg" for 80.12.27.252 at 2017-11-16 16:13:59 +0000
2017-11-16T16:13:59.161169+00:00 heroku[router]: at=info method=GET path="/assets/logo_altran.png" host=mysterious-crag-68857.herokuapp.com request_id=b5620bf1-cd26-430e-bdc4-4b18d283d602 fwd="80.12.27.252" dyno=web.1 connect=0ms service=34ms status=200 bytes=8918 protocol=https
2017-11-16T16:13:59.176271+00:00 heroku[router]: at=info method=GET path="/assets/home/build.jpg" host=mysterious-crag-68857.herokuapp.com request_id=19624a74-80a0-4796-b349-47e1a359291a fwd="80.12.27.252" dyno=web.1 connect=0ms service=43ms status=200 bytes=19242 protocol=https
2017-11-16T16:14:00.250138+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mysterious-crag-68857.herokuapp.com request_id=8f82cf74-f19c-4fd8-af88-aaa76fba7f60 fwd="80.12.27.252" dyno=web.1 connect=0ms service=4ms status=200 bytes=180 protocol=https
2017-11-16T16:38:30.000000+00:00 app[api]: Build started by user benchoufi.mehdi#gmail.com
2017-11-16T16:38:47.990291+00:00 app[api]: Deploy 504623ba by user benchoufi.mehdi#gmail.com
2017-11-16T16:38:47.990291+00:00 app[api]: Release v8 created by user benchoufi.mehdi#gmail.com
2017-11-16T16:38:30.000000+00:00 app[api]: Build succeeded
2017-11-16T16:38:49.057909+00:00 heroku[web.1]: State changed from up to starting
2017-11-16T16:38:49.057351+00:00 heroku[web.1]: Restarting
2017-11-16T16:38:50.018531+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2017-11-16T16:38:50.030701+00:00 app[web.1]: === puma shutdown: 2017-11-16 16:38:50 +0000 ===
2017-11-16T16:38:50.030736+00:00 app[web.1]: - Goodbye!
2017-11-16T16:38:50.030914+00:00 app[web.1]: Exiting
2017-11-16T16:38:50.172254+00:00 heroku[web.1]: Process exited with status 143
2017-11-16T16:38:50.003821+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-11-16T16:38:52.617190+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 3626 -e production`
2017-11-16T16:38:56.842223+00:00 app[web.1]: => Booting Puma
2017-11-16T16:38:56.842258+00:00 app[web.1]: => Rails 5.0.6 application starting in production on http://0.0.0.0:3626
2017-11-16T16:38:56.842260+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-11-16T16:38:56.842261+00:00 app[web.1]: Puma starting in single mode...
2017-11-16T16:38:56.842261+00:00 app[web.1]: * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
2017-11-16T16:38:56.842267+00:00 app[web.1]: * Min threads: 5, max threads: 5
2017-11-16T16:38:56.842268+00:00 app[web.1]: * Environment: production
2017-11-16T16:38:56.842314+00:00 app[web.1]: * Listening on tcp://0.0.0.0:3626
2017-11-16T16:38:56.842706+00:00 app[web.1]: Use Ctrl-C to stop
2017-11-16T16:38:56.991984+00:00 heroku[web.1]: State changed from starting to up
besides, here's the content of the application.css.scss
*= require animate
*= require jquery-ui
*= require owl.carousel
*= require owl.theme
*= require magnific-popup
*= require_self
*= require_tree .
*/
#import "bootstrap";
#import "bootstrap-sprockets";
#import "font-awesome";
is it possible to have more detail of what happened exactly maybe you can share your heroku logs.
Type => heroku logs --tail on terminal
Thanks
When you're running app on heroku you need to precompile your assets
Do the following:
In development.rb file put the below line:
config.assets.debug = false
and then run
RAILS_ENV=production bundle exec rake assets:precompile
You need to config Rails to serve static assets in production: config/environments/production.rb
config.assets.compile = true
Try this hope its help !

Meteor on Heroku Deployment

I am trying to deploy Meteor to a remote Heroku server. I am following this tutorial, but get errors. Any advise would be appreciated please.
When I do the git push heroku master:
However, the server logs:
2016-09-11T18:03:14.757898+00:00 heroku[slug-compiler]: Slug compilation started
2016-09-11T18:03:14.757903+00:00 heroku[slug-compiler]: Slug compilation finished
2016-09-11T18:03:41.646676+00:00 heroku[web.1]: Starting process with command `node build/bundle/main.js`
2016-09-11T18:03:44.098961+00:00 app[web.1]:
2016-09-11T18:03:44.099230+00:00 app[web.1]: assert.js:93
2016-09-11T18:03:44.099458+00:00 app[web.1]: throw new assert.AssertionError({
2016-09-11T18:03:44.101174+00:00 app[web.1]: AssertionError: "undefined" === "function"
2016-09-11T18:03:44.101176+00:00 app[web.1]: at Object.<anonymous> (/app/build/bundle/programs/server/mini-files.js:108:24)
2016-09-11T18:03:44.101177+00:00 app[web.1]: at Module._compile (module.js:456:26)
2016-09-11T18:03:44.101178+00:00 app[web.1]: at Module.load (module.js:356:32)
2016-09-11T18:03:44.101179+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2016-09-11T18:03:44.101180+00:00 app[web.1]: at Module.require (module.js:364:17)
2016-09-11T18:03:44.173228+00:00 heroku[web.1]: Process exited with status 8
2016-09-11T18:03:44.193642+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-11T18:03:44.194826+00:00 heroku[web.1]: State changed from crashed to starting
2016-09-11T18:04:02.230596+00:00 heroku[web.1]: Starting process with command `node build/bundle/main.js`
2016-09-11T18:04:04.559800+00:00 heroku[web.1]: Process exited with status 8
2016-09-11T18:04:04.471328+00:00 app[web.1]:
2016-09-11T18:04:04.471593+00:00 app[web.1]: assert.js:93
2016-09-11T18:04:04.473451+00:00 app[web.1]: at wrapPathFunction (/app/build/bundle/programs/server/mini-files.js:77:10)
2016-09-11T18:04:04.473452+00:00 app[web.1]: at Object.<anonymous> (/app/build/bundle/programs/server/mini-files.js:108:24)
2016-09-11T18:04:04.473453+00:00 app[web.1]: at Module._compile (module.js:456:26)
2016-09-11T18:04:04.473454+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2016-09-11T18:04:04.473455+00:00 app[web.1]: at Module.require (module.js:364:17)
2016-09-11T18:04:04.581922+00:00 heroku[web.1]: State changed from starting to crashed
UPDATE
I now try this tutorial with a vanilla meteor app:
meteor create meteor-thewhozoo
But when I try push it to the Heroku server:
I have read that adding the Mongo Database eliminates the request for Credit Card info, but it didn't work for me.
heroku config:set MONGO_URL=mongodb://<dbname>:<password>#ds021026.mlab.com:21026/mongo-thewhozoo
I want to avoid giving my card details for a development environment/proof of concept.
UPDATE
Card details can be avoided. Read this, (see Setting up the build back).
I recently was trying to deploy my meteor app to Heroku for the first time the other day. I followed this tutorial and it worked no problem.
https://medium.com/#gautham.gg/deploy-a-meteor-1-3-application-to-heroku-cda1f68ca20a#.wceub1sm3
Hope this helps.
You don't need to add card details by using mlab sandbox option for the database & that will give you 500MB slug size (which is more than sufficient for a dev environment).
You can pick the mlab sandbox db from heroku cli using the following command.
$ heroku addons:create mongolab:sandbox

Launch grunt serve with PM2

Is there a way to run grunt serve using PM2?
This way I could set up my environment to automatically start when my computer start up.
I found something like:
cd /path/to/project/
pm2 start grunt --name website -- serve
But that doesn't seem to work. I am getting the following error when looking at pm2 logs:
PM2: 2015-10-19 18:23:44: Script C:\Users\...\AppData\Roaming\npm\grunt had too many unstable restarts (15). Stopped. "errored"
grunt-0 (err): at Module._compile (module.js:413:25)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): at Function.Module._load (module.js:310:12)
grunt-0 (err): at Function._load (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\node_modules\pmx\lib\transaction.js:62:21)
grunt-0 (err): at Object.<anonymous> (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:28:21)
grunt-0 (err): at Module._compile (module.js:434:26)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): SyntaxError: Unexpected token case
grunt-0 (err): at exports.runInThisContext (vm.js:53:16)
grunt-0 (err): at Module._compile (module.js:413:25)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): at Function.Module._load (module.js:310:12)
grunt-0 (err): at Function._load (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\node_modules\pmx\lib\transaction.js:62:21)
grunt-0 (err): at Object.<anonymous> (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:28:21)
grunt-0 (err): at Module._compile (module.js:434:26)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
Running pm2 start grunt alone worked for me, still cannot explain why though
Hey this worked for me.
cd /path/to/project/
pm2 start node_module/grunt/bin/grunt --name website -- serve
Explanation: PM2 will try to execute the file after start and will look it in the local path. grunt, I asume, references to the global installation of grunt. But node_module/grunt/bin/grunt is in the scope of PM2, so you can run this file.
I only use it for local development and I don't recommend this solution for production, but it can be helpful to run your app locally and check for logs in pm2. Also, if you run your back end services in the same instance of pm2, and you test something against this stack while executing "pm2 logs" you can see the whole trace of execution through all the services in order. Something very difficult even if you have some centralized logging solution like Kibana or splunk, because network lag is always messing with the order of log entries.

Resources