Git Product home page Git Product logo

heroku-buildpack-ember-cli's Introduction

WARNING! This buildpack has been deprecated!

Please use the Heroku buildpack here: https://github.com/heroku/heroku-buildpack-emberjs

Notes

A recent change to the buildpack has made caching much more aggressive. If you are having trouble deploying run...

$ heroku config:set REBUILD_ALL=true
$ heroku plugins:install heroku-repo
$ heroku repo:purge_cache -a APPNAME

Be sure to replace APPNAME with your app's name. Now, push your repo up. Once that build is complete, your dependencies are rebuilt and cached. Now, unset the var...

$ heroku config:unset REBUILD_ALL

Future deploys should now work much faster!

Heroku Buildpack for Ember CLI Applications

This buildpack will work out of the box with Ember CLI generated applications. It installs Node, Nginx and generates a production build with the Ember CLI.

Usage

Creating a new Heroku instance from an Ember CLI application's parent directory:

$ heroku create --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom buildpack
...

Or, use the Heroku Deploy button:

Deploy

Configuration

You can set a few different environment variables to turn on features in this buildpack.

Nginx Workers

Set the number of workers for Nginx (Default: 4):

$ heroku config:set NGINX_WORKERS=4

This will depend on your Heroku instance size and the amount of dynos.

API Proxy

Set an API proxy URL:

$ heroku config:set API_URL=http://api.example.com/

Set your API's prefix path (Default: /api/):

$ heroku config:set API_PREFIX_PATH=/api/

Trailing slashes are important. For more information about API proxies and avoiding CORS, read this.

Authentication

Setting BASIC_AUTH_USER and BASIC_AUTH_PASSWORD in your Heroku application will activate basic authentication:

$ heroku config:set BASIC_AUTH_USER=EXAMPLE_USER
$ heroku config:set BASIC_AUTH_PASSWORD=EXAMPLE_PASSWORD

Be sure to use HTTPS for added security.

Force HTTPS/SSL

For most Ember applications that make any kind of authenticated requests HTTPS should be used. It supports the headers X-Forwarded-Proto (used by Heroku) and CF-Visitor (used by CloudFlare). Enable this feature in Nginx by setting FORCE_HTTPS:

$ heroku config:set FORCE_HTTPS=true

LetsEncrypt support

Using heroku config:set ACME_CHALLENGE=<challenge-phrase> allows the app to respond correctly to the call from a manual certbot command that is used to generate a LetsEncrypt SSL certificate.

Follow these steps to get your free SSL certificate installed. (Assumes you have SNI-SSL installed on your app.)

$ sudo certbot certonly --email=<your-email-address> --manual -d <your-domain-name>
$ heroku config:set ACME_CHALLENGE='<challenge phrase returned from the above command>'
# copy fullchain.pem privkey.pem locally from the path certbot put them
$ heroku _certs:update fullchain.pem privkey.pem
$ heroku config:unset ACME_CHALLENGE

Prerender.io

Prerender.io allows your application to be crawled by search engines.

Set the service's host and token:

$ heroku config:set PRERENDER_HOST=service.prerender.io
$ heroku config:set PRERENDER_TOKEN=<your-prerender-token>

Sign up for the hosted Prerender.io service or host it yourself. See the project's repo for more information.

Naked Domain Redirection

Visitors can be redirected from your "naked domain" (example.com) to www.example.com. Set your naked domain:

$ heroku config:set NAKED_DOMAIN=example.com

This uses a HTTP 301 redirect to forward the request. All parameters are preserved.

Private Repositories

Configure a GIT_SSH_KEY to allow Heroku access to private repositories:

$ heroku config:set GIT_SSH_KEY=<base64-encoded-private-key>

If present, the buildpack expects the base64 encoded contents of a private key whose public key counterpart has been registered with GitHub on an account with access to any private repositories needed by the application. Prior to executing npm install and bower install it decodes the contents into a file, launches ssh-agent and registers that keyfile. Once NPM install is finished, it cleans up the environment and file system of the key contents.

Private NPM dependency URLs must be in the form of git+ssh://[email protected]:[user]/[repo].git. Private Bower dependency URLs must be in the form of [email protected]:[user]/[repo].git. Either NPM or Bower URLs may have a trailing #semver.

Environment

Choose the environment you want to build by setting:

$ heroku config:set EMBER_ENV=production

Before and After Hooks

Have the buildpack run your own scripts before and after the ember build by creating a hooks/before_hook.sh or hooks/after_hook.sh file in your Ember CLI application:

$ mkdir -p hooks

For a before build hook:

$ touch hooks/before_hook.sh
$ chmod +x hooks/before_hook.sh

For an after build hook:

$ touch hooks/after_hook.sh
$ chmod +x hooks/after_hook.sh

See below for examples.

Example Before Hook: Compass

Compass can be installed using the before build hook. Create hooks/before_hook.sh and add the following script:

#!/usr/bin/env bash

export GEM_HOME=$build_dir/.gem/ruby/2.2.0
export PATH=$GEM_HOME/bin:$PATH

if test -d $cache_dir/ruby/.gem; then
  status "Restoring ruby gems directory from cache"
  cp -r $cache_dir/ruby/.gem $build_dir
  HOME=$build_dir gem update compass --user-install --no-rdoc --no-ri
else
  HOME=$build_dir gem install compass --user-install --no-rdoc --no-ri
fi

rm -rf $cache_dir/ruby
mkdir -p $cache_dir/ruby

if test -d $build_dir/.gem; then
  status "Caching ruby gems directory for future builds"
  cp -r $build_dir/.gem $cache_dir/ruby
fi

Force Rebuilds

Sometimes it is necessary to rebuild NPM modules or Bower dependencies from scratch. This can become necessary when updating Ember or EmberCLI midway through a project and cleaning the Bower and NPM caches doesn't always refresh the cache in the Dyno during the next deployment. In those cases, here is a simple and clean way to force a rebuild.

To force a rebuild of NPM modules and Bower dependencies:

heroku config:set REBUILD_ALL=true
git commit -am 'rebuild' --allow-empty
git push heroku master
heroku config:unset REBUILD_ALL

To force a rebuild of just the NPM modules:

heroku config:set REBUILD_NODE_PACKAGES=true
git commit -am 'rebuild' --allow-empty
git push heroku master
heroku config:unset REBUILD_NODE_PACKAGES

To force a rebuild of Bower dependencies:

heroku config:set REBUILD_BOWER_PACKAGES=true
git commit -am 'rebuild' --allow-empty
git push heroku master
heroku config:unset REBUILD_BOWER_PACKAGES

Custom Nginx

You can install a custom build of Nginx by setting the $NGINX_URL:

$ heroku config:set NGINX_URL=<the url to your custom build of nginx>

Without this set, the version of Nginx installed will be 1.6.0.

Custom Nginx config

In your Ember CLI application, add a config/nginx.conf.erb file and add your own Nginx configuration.

You should copy the existing configuration file in this repo and make changes to it for best results.

Caching

The Ember CLI buildpack caches your NPM and Bower dependencies by default. This is similar to the Heroku Buildpack for Node.js. This makes typical deployments much faster. Note that dependencies like components/ember#canary will not be updated on each deploy.

To purge the cache and reinstall all dependencies, run:

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
$ heroku repo:purge_cache -a APPNAME

IP Whitelist

Setting IP_WHITELIST in your Herkou application to a comma delimited list of IP addresses or CIDR blocks will restrict access to your application to only those values.

$ heroku config:set IP_WHITELIST=192.168.0.0/24,192.168.1.42

Yarn

The Ember CLI buildpack supports yarn. If a yarn.lock file is present, the buildpack will use yarn install instead of npm install.

If a specific version of yarn is specified in engines.yarn within your package.json, it will use that version. Otherwise it will install the latest version.

Troubleshooting

Clean your project's dependencies:

$ npm cache clear
$ bower cache clean
$ rm -rf node_modules bower_components
$ npm install --no-optional
$ bower install

Be sure to save any Bower or NPM resolutions. Now, let's build your Ember CLI application locally:

$ ember build

Check your git status and see if that process has made any changes to your application's code. Now, try your Heroku deployment again.

NPM not installing anything in production

Heroku will run npm scripts in production mode if your NODE_ENV is set to production. Since all Ember dependencies are in devDependencies, nothing will install. To fix this, run:

$ heroku config:set NPM_CONFIG_PRODUCTION=false

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Contributors

A special thanks to everyone who maintains and helps out on the project!

  • Aaron Chambers
  • Aaron Ortbals
  • Aaron Renner
  • Adriaan
  • Adriaan van Rossum
  • Bill Curtis
  • Brett Chalupa
  • Chris Santero
  • Donal Byrne
  • GabKlein
  • Gabriel Klein
  • John Griffin
  • Jonas Brusman
  • Jonathan Johnson
  • Jonathan Zempel
  • Jordan Morano
  • Juan Pablo Pinilla Ossa
  • Kori Roys
  • Matt McGinnis
  • Mayank Patel
  • Optimal Cadence
  • Peter Brown
  • Rob Guilfoyle
  • Ryan LeFevre
  • Tony Coconate
  • harianus
  • sbl

Generated with: git log --format='%aN' | sort -u.

heroku-buildpack-ember-cli's People

Contributors

aaronrenner avatar achambers avatar adriaandotcom avatar aortbals avatar bauerjon avatar beerlington avatar brettchalupa avatar byrnedo avatar csantero avatar dhaulagiri avatar gabklein avatar himynameisjonas avatar john-griffin avatar jordpo avatar jrjohnson avatar jzempel avatar kenglxn avatar kmiyashiro avatar koriroys avatar kuinak avatar mattmcginnis avatar meltingice avatar quinnlee avatar robguilfoyle avatar sandnap avatar sbl avatar talhaobject90 avatar tonycoco avatar wcurtis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-buildpack-ember-cli's Issues

bower not found

hello
I'm trying to update my heroku app but i'm getting an error

-----> Installing dependencies

   > [email protected] postinstall /tmp/build_d2ec55ab-4cef-434c-8965-d459f6eaeba6/node_modules/ember-cli-qunit
   > bower install

   sh: bower: not found

i think it happened after you latest commit 0dab4ce

i'm using ember-cli v0.0.45 and my packages are:

"devDependencies": {
  "bower": "^1.3.5",
  "body-parser": "^1.2.0",
  "broccoli-asset-rev": "0.1.1",
  "broccoli-ember-hbs-template-compiler": "^1.6.1",
  "broccoli-less-single": "^0.1.4",
  "broccoli-merge-trees": "0.1.4",
  "broccoli-static-compiler": "0.1.4",
  "ember-cli": "0.0.45",
  "ember-data": "1.0.0-beta.10",
  "ember-cli-ic-ajax": "0.1.1",
  "ember-cli-inject-live-reload": "^1.0.2",
  "ember-cli-qunit": "0.0.7",
  "express": "^4.8.5",
  "glob": "^4.0.5"
 }

Proxy between 2 Heroku apps is not working

Hi,

I’ve been trying to proxy an Ember app hosted on an Heroku instance through another Heroku instance. MY API_URL is http://example-api.herokuapp.com and the API_PREFIX_PATH is /app/.

The ember app url is: http://example-webapp.herokuapp.com.
The API app url is: http://example-api.herokuapp.com.

So here is my problem:

When I call http://example-webapp.herokuapp.com/projects, the webapp calls http://example-webapp.herokuapp.com/app/projects by AJAX.

This last call should be proxied to http://example-api.herokuapp.com/app/projects. But it never "leaves" the webapp instance and it seems to accumulate the X-Forwarded-For header. Here is the trace from the Heroku webapp instance:

2014-08-13T15:16:40.306416+00:00 heroku[router]: at=info method=GET path="/app/projects" host=saga-iotheatre-webapp-qa.heroku
app.com request_id=8271f6f4-c78e-49fb-a3a7-68360528ddac fwd="69.70.255.90, 10.93.89.126, 54.167.49.65, 10.226.67.253, 54.167.
49.65, 10.185.134.133, 54.167.49.65, 10.12.183.152, 54.167.49.65, 10.145.231.166, 54.167.49.65, 10.226.67.253, 54.167.49.65,
10.164.68.147, 54.167.49.65, 10.147.157.74, 54.167.49.65, 10.178.1.13, 54.167.49.65, 10.62.103.22, 54.167.49.65, 10.147.157.7
4, 54.167.49.65, 10.178.1.13, (and so on for 100 more addresses)" dyno=web.1 connect=1ms service=4128ms status=400 bytes=2996

And here is the response header received in the browser:

image

I am using the default nginx.conf.erb included in this repo.

I have tested a node buildpack to run directly ember server with --proxy and it works. But this solution is not bulletproof I think. The ember command for the proxy to work:

ember server --environment=production --port=$PORT --live-reload=false --proxy http://example-api.herokuapp.com

Thanks in advance for your help, I hope I gave enough details for this confusing problem 😄

BuildingBuilding.Build failed

I deployed a few days ago without issues, but today the push is failing; see below. I am able to build without problems on my local machine.


local

> ember build
version: 0.0.42
Built project successfully. Stored in "dist/".

heroku

-----> Building Ember CLI application production distribution
bower loader#1.0.1            mismatch Version declared in the json (0.0.0) is different than the resolved one (1.0.1)
bower ember-resolver#~0.1.7   mismatch Version declared in the json (0.1.6) is different than the resolved one (0.1.7)
bower foundation#~5.4.3   invalid-meta foundation is missing "ignore" entry in bower.json
bower jquery-placeholder#~2.0.7     invalid-meta jquery-placeholder is missing "ignore" entry in bower.json
bower modernizr#>= 2.7.2            invalid-meta modernizr is missing "main" entry in bower.json
bower modernizr#>= 2.7.2            invalid-meta modernizr is missing "ignore" entry in bower.json
       version: 0.0.42
       BuildingBuilding.Build failed.
       /tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/bower_components/foundation/scss/foundation/functions:13: error: error reading values after )
        [string exception]
       Error: /tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/bower_components/foundation/scss/foundation/functions:13: error: error reading values after )
        [string exception]
           at /tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:34:15
           at $$$internal$$tryCatch (/tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
           at $$$internal$$invokeCallback (/tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
           at $$$internal$$publish (/tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)
           at $$$internal$$publishRejection (/tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:395:7)
           at $$rsvp$asap$$flush (/tmp/build_ded8be90-8a84-4462-8cf8-fe73a2ac89c7/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
           at process._tickCallback (node.js:419:13)

 !     Push rejected, failed to compile Ember CLI app

Handlebars 2.0.0 error

After upgrading to Ember CLI v0.1.7, Ember 1.9.1 and Handlebars 2.0.0 I can no longer deploy. Looks related to Handlebars?

remote: bower loader.js#1.0.1         mismatch Version declared in the json (0.0.0) is different than the resolved one (1.0.1)
remote: bower handlebars#>= 1.0.0 < 2.0.0     invalid-meta handlebars is missing "ignore" entry in bower.json
remote: bower ember#^1.3.0                    invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#> 1.5.0-beta.3            invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#>=1.4 <2                  invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#1.9.1                     invalid-meta ember is missing "ignore" entry in bower.json
remote: bower ember#>= 1.7.0                  invalid-meta ember is missing "ignore" entry in bower.json
remote: bower handlebars#>= 2.0.0 < 3.0.0     invalid-meta handlebars is missing "ignore" entry in bower.json
remote: bower                                    ECONFLICT Unable to find suitable version for handlebars

routes ending with "js"

I am having troubles with ember routes ending with a "js" string. like "/topic/emberjs"

looks like its getting parsed as static file by nginx.conf
anyway to do this explicit on "_.js" rather than "_js"

Build fails with version 0.3.0 of ember-cli-app-version

I was trying to deploy the latest version of emberaddons.com and the build was failing on heroku. I noticed the issue was related to v0.3.0 of ember-cli-app-version. After upgrading to v0.3.1 everything worked fine.

Thought that might be important to document since ember-cli comes with v0.3.0 of ember-cli-app-version.

Heroku deployment fails

Here is a brief overview of the error I'm getting: http://stackoverflow.com/questions/28913452/ember-cli-heroku-build-fails

remote: -----> Pruning cached bower dependencies not specified in bower.json

remote: -----> Caching node_modules directory for future builds

remote: -----> Cleaning up node-gyp and npm artifacts

remote: bower loader.js#1.0.1 mismatch Version declared in the json (0.0.0) is different than the resolved one (1.0.1)

remote: bower ember-qunit#0.2.8 invalid-meta ember-qunit is missing "main" entry in bower.json

remote: bower ember-data#1.0.0-beta.12 invalid-meta ember-data is missing "ignore" entry in bower.json

remote: bower ember#1.10.0 invalid-meta ember is missing "ignore" entry in bower.json

remote: bower ECONFLICT Unable to find suitable version for ember-data

remote:

remote: ! Push rejected, failed to compile Ember CLI app

Heroku build fails when trying to load JS file via app.import

I'm loading a JS file as described in http://www.ember-cli.com/#standard-non-amd-asset, by adding the following line to Brocfile.js:

app.import('vendor/simplewebrtc/latest.js');

Creating development and production builds works fine locally, but when I push it to Heroku I'm getting the following error:

-----> Building Ember CLI application production distribution
bower ember-cli-shims#0.0.2   mismatch Version declared in the json (0.0.1) is different than the resolved one (0.0.2)
bower loader#1.0.0            mismatch Version declared in the json (0.0.0) is different than the resolved one (1.0.0)
bower ember-qunit-notifications#^0.0.3         mismatch Version declared in the json (0.0.2) is different than the resolved one (0.0.3)
bower ember-resolver#~0.1.5                    mismatch Version declared in the json (0.1.6) is different than the resolved one (0.1.7)
bower qunit-notifications#~0.0.2               mismatch Version declared in the json (0.0.1) is different than the resolved one (0.0.2)
bower qunit#~1.12.0                        invalid-meta qunit is missing "main" entry in bower.json
bower qunit#~1.12.0                        invalid-meta qunit is missing "ignore" entry in bower.json
bower ember-qunit#~0.1.8                   invalid-meta ember-qunit is missing "main" entry in bower.json
bower handlebars#~1.3.0                    invalid-meta handlebars is missing "ignore" entry in bower.json
bower ember-data#~1.0.0-beta.7             invalid-meta ember-data is missing "ignore" entry in bower.json
bower ember#1.6.1                          invalid-meta ember is missing "ignore" entry in bower.json
       version: 0.0.40
       BuildingBuild failed.
       Path or pattern "vendor/simplewebrtc/latest.js" did not match any files
       Error: Path or pattern "vendor/simplewebrtc/latest.js" did not match any files
           at Object.multiGlob (/tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-kitchen-sink-helpers/index.js:221:13)
           at /tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/broccoli-concat/index.js:41:30
           at $$$internal$$tryCatch (/tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
           at $$$internal$$invokeCallback (/tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
           at $$$internal$$publish (/tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)
           at $$rsvp$asap$$flush (/tmp/build_341c3908-224f-4d07-9413-2d6b1ac9ae08/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
           at process._tickCallback (node.js:419:13)
 !     Push rejected, failed to compile Ember CLI app

Error when pushing latest version of ember-cli

I've recently updated my ember-cli project and when I tried to push it to Heroku received this error. Any ideas? Thanks.

"-----> Pruning cached bower dependencies not specified in bower.json
-----> Caching node_modules directory for future builds
-----> Cleaning up node-gyp and npm artifacts
bower ember-cli-shims#0.0.2 mismatch Version declared in the json (0.0.1) is different than the resolved one (0.0.2)
bower loader#1.0.0 mismatch Version declared in the json (0.0.0) is different than the resolved one (1.0.0)
bower ember-qunit-notifications#^0.0.3 mismatch Version declared in the json (0.0.2) is different than the resolved one (0.0.3)
bower handlebars#~1.3.0 invalid-meta handlebars is missing "ignore" entry in bower.json
bower qunit#~1.12.0 invalid-meta qunit is missing "main" entry in bower.json
bower qunit#~1.12.0 invalid-meta qunit is missing "ignore" entry in bower.json
bower ember#1.6.1 invalid-meta ember is missing "ignore" entry in bower.json
bower ember-qunit#~0.1.8 invalid-meta ember-qunit is missing "main" entry in bower.json
bower ember-localstorage-adapter#~0.4.0 mismatch Version declared in the json (0.3.2) is different than the resolved one (0.4.0)
bower ember-data#>= 1.0.0-beta.6 invalid-meta ember-data is missing "ignore" entry in bower.json
bower ember-data#~1.0.0-beta.7 invalid-meta ember-data is missing "ignore" entry in bower.json
bower ember#>= 1.7.0 invalid-meta ember is missing "ignore" entry in bower.json
bower ECONFLICT Unable to find suitable version for ember

! Push rejected, failed to compile Ember CLI app
"

How to setup Heroku API_URL to access api-stubs generated by Ember CLI?

I generated API stubs, but after deploying to Heroku when I try to access them, they all return contents of index.html file. In nginx.conf.erb file there's something regarding API_URL env variable (https://github.com/tonycoco/heroku-buildpack-ember-cli/blob/master/config/nginx.conf.erb#L53), but I'm not sure what value should I use. I just want to access my page via https://my-app.herokuapp.com and would like all calls to https://my-app.herokuapp.com/api/whatever to be properly handled. I tried setting API_URL to https://my-app.herokuapp.com, but from Heroku logs it looks like it just redirects back to itself or sth:

fwd="my IP address, 10.54.183.158, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.76.150.87, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.76.150.87, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.76.150.87, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.76.150.87, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.76.150.87, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.35.132.102, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.74.3.166, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.238.166.142, 54.74.248.70, 10.34.186.222, 54.74.248.70, 10.33.164.169, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.241.31.180, 54.74.248.70, 10.239.23.27, 54.74.248.70, 10.34.132.2, 54.74.248.70, 10.33.164.169,54.74.248.70"

EDIT: I don't know much about nginx configuration, but I modified it by adding location /api/ {} to handle API routes and now I'm getting 404. Does this buildpack actually start any node server or does it start nginx only? Are Ember CLI API stubs really just stubs? I'm using it to call third party service and having to deploy a whole separate app on Heroku with just one or two endpoints seems a bit overkill.

Deployment to Heroku - fails on build

Hello,

I'm trying to deploy my Ember Cli application to Heroku using the Ember Cli Buildpack - https://github.com/tonycoco/heroku-buildpack-ember-cli.git.

The build fails when bower tries to install a certain type of dependancy (see below - it fails on the antiscroll).

bower jquery-ui#1.10.1                       deprecated Package jquery-ui is using the deprecated component.json
bower jquery-ui#1.10.1                     invalid-meta jquery-ui is missing "ignore" entry in bower.json
bower antiscroll#fa3f81d3c07b647a63036da1de859fcaf1355993          ECMDERR Failed to execute "git checkout fa3f81d3c07b647a63036da1de859fcaf1355993", exit code of #128

Additional error details:
fatal: Not a git repository: '.'

 !     Push rejected, failed to compile Ember CLI app

This is a specific commit SHA of antiscroll which is stated in my bower.json as...

 "antiscroll": "fa3f81d3c07b647a63036da1de859fcaf1355993"

I'm guessing the build script isn't specifying this properly as it's building.
I've tried the common workaround...

git config --global url."https://".insteadOf git://

...with no success.

Has anyone else run into this before, or know of a solution?

Much appreciated,
Steve

undefined is not a function

I'm having issues when pushing to Heroku. See error log below. This seems similar to the most comment posted here: #32

Of note is that when Googling around to solve this issue, some people mention that upgrading ember-cli to 0.2.0 solved the issue. I have ember-cli 0.2.1, but for some reason, the log below says it is trying to build with version 0.1.5.

I have tried performing all of the cleanup steps listed here:
https://github.com/ember-cli/ember-cli/releases/tag/v0.1.2

Here's my package.json:

{
"name": "weekendr-ember-cli",
"version": "0.0.0",
"description": "Small description for weekendr-ember-cli goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.0",
"ember-cli": "^0.2.1",
"ember-cli-app-version": "0.3.2",
"ember-cli-babel": "^4.0.0",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.9",
"ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.15",
"ember-export-application-global": "^1.0.2",
"glob": "4.5.3",
"rimraf": "2.2.8"
}
}

Error log:

emote: -----> Caching bower_components directory for future builds
remote: -----> Building Ember CLI application production distribution
remote: version: 0.1.5
remote: Could not find watchman, falling back to NodeWatcher for file system events
remote: BuildingCleanup error.
remote: undefined is not a function
remote: TypeError: undefined is not a function
remote: at Function.rimrafSync (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf/rimraf.js:262:13)
remote: at ConfigLoader.CachingWriter.cleanup (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/index.js:114:10)
remote: at cleanupTree (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:128:19)
remote: at /tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli/node_modules/promise-map-series/index.js:8:27
remote: at $$$internal$$tryCatch (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:490:16)
remote: at $$$internal$$invokeCallback (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:502:17)
remote: at $$$internal$$publish (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:473:11)
remote: at $$rsvp$asap$$flush (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1581:9)
remote: at process._tickCallback (node.js:355:11)
remote: Build failed.
remote: undefined is not a function
remote: TypeError: undefined is not a function
remote: at rimraf (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf/rimraf.js:57:13)
remote: at lib$rsvp$node$$tryApply (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1467:11)
remote: at lib$rsvp$node$$handleValueInput (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1567:20)
remote: at fn (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1555:18)
remote: at /tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/index.js:100:14
remote: at lib$rsvp$$internal$$tryCatch (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:489:16)
remote: at lib$rsvp$$internal$$invokeCallback (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:501:17)
remote: at lib$rsvp$$internal$$publish (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:472:11)
remote: at lib$rsvp$asap$$flush (/tmp/build_dcfcd05d5a5361ada76663c3e628272f/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1290:9)
remote: at process._tickCallback (node.js:355:11)
remote:
remote: ! Push rejected, failed to compile Ember CLI app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to murmuring-falls-8111.
remote:

Make deploys faster

I was just wondering if deploys could be faster.
Right now, it approximately takes 6 minutes to deploy a bare ember-cli app to heroku.

Issue deploying with ember-cli 0.1.7

Not sure if I'm missing something, but I just tried to deploy an ember-cli 0.1.7 app to Heroku in production mode, the deployment succeeds but the app keeps crashing, until now I have had to manually:

  • Copy my devDependencies into dependencies in package.json
  • Add bower package to dependencies in package.json because I noticed it wasn't being installed.

Yet the logs say that I need to run bower install somehow, I can't figure out how.

Anyway that's something that should be made during the deployment but it's not happening, maybe this is an incompatibility with the latest ember-cli?

I'm on a cedar-14 stack.

Thanks!

Proxy between two Heroku apps not receiving API_PREFIX_PATH

Hi,

I have two Heroku apps (Ember CLI & Rails), and it appears from the logs that the Ember app is sending the correct request /api/categories, but the Rails Heroku app is receiving the request without the /api/ prefix.

Here are the Ember logs (you can see the GET /api/categories on the second to last line):

2015-03-01T00:17:56.249010+00:00 heroku[router]: at=info method=GET path="/categories" host=time-keeper-ember.herokuapp.com request_id=e48b97ac-30c2-4465-bf78-71f0e09fa9ed fwd="68.12.20.61" dyno=web.1 connect=1ms service=1ms status=304 bytes=233
2015-03-01T00:17:56.248347+00:00 app[web.1]: measure#nginx.service=0.001 request_id=e48b97ac-30c2-4465-bf78-71f0e09fa9ed
2015-03-01T00:17:56.457100+00:00 heroku[router]: at=info method=GET path="/assets/vendor-a2fd2ed071d75f655927dd1c0e15f636.css" host=time-keeper-ember.herokuapp.com request_id=c71965d8-6931-45a6-ae70-b11a6962e65a fwd="68.12.20.61" dyno=web.1 connect=1ms service=1ms status=304 bytes=266
2015-03-01T00:17:56.457215+00:00 heroku[router]: at=info method=GET path="/assets/time-keeper-ember-bc928484a6acac5c793437ce6c8ad8c5.css" host=time-keeper-ember.herokuapp.com request_id=b9bb55b3-4838-421c-8da8-06c341f61f73 fwd="68.12.20.61" dyno=web.1 connect=1ms service=1ms status=304 bytes=267
2015-03-01T00:17:56.454337+00:00 heroku[router]: at=info method=GET path="/assets/vendor-908b07c7849a3d82e758ab826952ca9c.js" host=time-keeper-ember.herokuapp.com request_id=3b98233e-faaa-4d10-8345-4547172a8bfa fwd="68.12.20.61" dyno=web.1 connect=1ms service=1ms status=304 bytes=267
2015-03-01T00:17:56.718343+00:00 heroku[router]: at=info method=GET path="/assets/time-keeper-ember-98e1be7ebadd983d8a7e976fb246f744.js" host=time-keeper-ember.herokuapp.com request_id=723e3d69-6c45-408b-8cba-ab0a049d1f4f fwd="68.12.20.61" dyno=web.1 connect=1ms service=1ms status=304 bytes=266
2015-03-01T00:17:57.258396+00:00 heroku[router]: at=info method=GET path="/api/categories" host=time-keeper-ember.herokuapp.com request_id=1f54841c-48d6-4516-8dda-c2661c7e419c fwd="68.12.20.61" dyno=web.1 connect=1ms service=36ms status=404 bytes=290
2015-03-01T00:17:57.258964+00:00 app[web.1]: measure#nginx.service=0.036 request_id=1f54841c-48d6-4516-8dda-c2661c7e419c

And the Rails logs:

2015-03-01T00:17:57.253106+00:00 heroku[router]: at=info method=GET path="/categories" host=time-keeper.herokuapp.com request_id=1f54841c-48d6-4516-8dda-c2661c7e419c fwd="68.12.20.61, 10.123.86.56,54.161.37.34" dyno=web.1 connect=0ms service=16ms status=404 bytes=306
2015-03-01T00:17:57.238123+00:00 app[web.1]: Started GET "/categories" for 54.161.37.34 at 2015-03-01 00:17:57 +0000
2015-03-01T00:17:57.248397+00:00 app[web.1]:
2015-03-01T00:17:57.248402+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/categories"):
2015-03-01T00:17:57.248404+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2015-03-01T00:17:57.248405+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2015-03-01T00:17:57.248407+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/rack/logger.rb:38:in `call_app'
2015-03-01T00:17:57.248409+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/rack/logger.rb:20:in `block in call'
2015-03-01T00:17:57.248411+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2015-03-01T00:17:57.248412+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:26:in `tagged'
2015-03-01T00:17:57.248414+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/tagged_logging.rb:68:in `tagged'
2015-03-01T00:17:57.248415+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/rack/logger.rb:20:in `call'
2015-03-01T00:17:57.248417+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2015-03-01T00:17:57.248418+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2015-03-01T00:17:57.248420+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2015-03-01T00:17:57.248421+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.6/lib/action_dispatch/middleware/static.rb:64:in `call'
2015-03-01T00:17:57.248423+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/engine.rb:514:in `call'
2015-03-01T00:17:57.248424+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/application.rb:144:in `call'
2015-03-01T00:17:57.248426+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2015-03-01T00:17:57.248427+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2015-03-01T00:17:57.248429+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2015-03-01T00:17:57.248430+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2015-03-01T00:17:57.248432+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2015-03-01T00:17:57.248433+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2015-03-01T00:17:57.248434+00:00 app[web.1]:
2015-03-01T00:17:57.248435+00:00 app[web.1]:

This is my config for the Ember app:

=== time-keeper-ember Config Vars
API_PREFIX_PATH: /api/
API_URL:         https://time-keeper.herokuapp.com/
BUILDPACK_URL:   https://github.com/tonycoco/heroku-buildpack-ember-cli.git

Ember - time-keeper-ember.herokuapp.com
Rails - time-keeper.herokuapp.com

When I run my Ember app locally and proxy to the production Rails app (ember serve --proxy https://time-keeper.herokuapp.com), it works fine, so I believe the problem is between the two Heroku apps themselves.

I saw this closed issue, but it appears to be a different problem from the one I'm having.

Any ideas if this could be from the buildpack? If I didn't supply enough or the right kind of information let me know. Thank you so much for this buildpack—it is amazing. This is my final hurdle. :/

brettwhitelaw.com / NGINX tar not resolving

Tried to update an app today, noticed the nginx tar that this repo is pointing to isn't resolving:
http://www.brettwhitelaw.com/pkg/nginx-1.6.0.tar.gz

https://github.com/tonycoco/heroku-buildpack-ember-cli/blob/master/bin/compile#L63

Which is resulting in the following error when pushing to Heroku:

-----> Ember CLI app detected

       PRO TIP: Avoid using semver ranges starting with '>' in engines.node
       See https://devcenter.heroku.com/articles/nodejs-support

-----> Requested node range:  >= 0.10.0
-----> Resolved node version: 0.10.33
-----> Downloading and installing node
-----> Downloading and installing nginx

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Exiting with failure status due to previous errors

 !     Push rejected, failed to compile Ember CLI app

Multiple Ember-applications with only one Nginx?

I'd like to seperate my Ember-application into two applications. One for the admin-frontend and another one for the website itself.
Using your buildpack twice would be no problem but the additional Nginx-instance seems to be a bit of wasted resources.

Is it possible to use multiple Ember-applications with just one Nginx?

Unable to use http-mock

We deploy our app to Heroku in the development/testing phase to share with our team. It would be great if http-mock works.

Path or pattern "vendor/loader/loader.js" did not match any files

I get the following error when pushing to heroku:

-----> Building Ember CLI application production distribution                                                                                                                        
bower loader#1.0.1            mismatch Version declared in the json (0.0.0) is different     than the resolved one (1.0.1)                                                               
bower ember-resolver#~0.1.7   mismatch Version declared in the json (0.1.6) is    different than the resolved one (0.1.7)                                                               
bower ember#1.7.0-beta.5  invalid-meta ember is missing "ignore" entry in bower.json                                                                                                 
   version: 0.0.40                                                                                                                                                               
   BuildingBuild failed.                                                                                                                                                         
   Path or pattern "vendor/loader/loader.js" did not match any files                                                                                                             
   Error: Path or pattern "vendor/loader/loader.js" did not match any files                                                                                                      
       at Object.multiGlob (/tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/broccoli-concat/node_modules/broccoli-kitchen-sink-helpers/index.
js:221:13)                                                                                                                                                                           
       at /tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/broccoli-concat/index.js:41:30                                                     
       at $$$internal$$tryCatch (/tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)                                   
       at $$$internal$$invokeCallback (/tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)                             
       at $$$internal$$publish (/tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)                                    
       at $$rsvp$asap$$flush (/tmp/build_b7af3d1d-6145-4102-98eb-a711f1e5e734/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)                                      
       at process._tickCallback (node.js:419:13)                                 

Everything runs fine on my machine...

versions are as follows

$ ember -v
version: 0.0.44
node: 0.10.26
npm: 1.4.26

but saw the error with older versions as well:

ember -v
version: 0.0.40-master-2ebd8e312c
node: 0.10.26
npm: 1.4.23

deploy fails when using sass

I'm trying to push out an app that is barely more than static html -- I've installed broccoli-sass into my project.

There seems to be a missing dependency in the build-pack to let this compile properly?

-----> Installing dependencies

       > [email protected] install /tmp/build_1e55a9301b11e6cf6155c90e55124480/node_modules/broccoli-sass/node_modules/node-sass
       > node build.js

       `linux-x64-v8-3.14` exists; testing
       make: Entering directory `/tmp/build_1e55a9301b11e6cf6155c90e55124480/node_modules/broccoli-sass/node_modules/node-sass/build'
         CXX(target) Release/obj.target/binding/binding.o
       cc1plus: error: unrecognized command line option "-std=c++11"
       cc1plus: error: unrecognized command line option "-std=c++11"
       make: *** [Release/obj.target/binding/binding.o] Error 1
       make: Leaving directory `/tmp/build_1e55a9301b11e6cf6155c90e55124480/node_modules/broccoli-sass/node_modules/node-sass/build'
       gyp ERR! build error
       gyp ERR! stack Error: `make` failed with exit code: 2
       gyp ERR! stack     at ChildProcess.onExit (/tmp/build_1e55a9301b11e6cf6155c90e55124480/vendor/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
       gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
       gyp ERR! System Linux 3.8.11-ec2
       gyp ERR! command "node" "/tmp/build_1e55a9301b11e6cf6155c90e55124480/vendor/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
       gyp ERR! cwd /tmp/build_1e55a9301b11e6cf6155c90e55124480/node_modules/broccoli-sass/node_modules/node-sass
       gyp ERR! node -v v0.10.33
       gyp ERR! node-gyp -v v1.0.1
       gyp ERR! not ok
       Build failed
       npm ERR! [email protected] install: `node build.js`
       npm ERR! Exit status 1
       npm ERR!
       npm ERR! Failed at the [email protected] install script.
       npm ERR! This is most likely a problem with the node-sass package,
       npm ERR! not with npm itself.
       npm ERR! Tell the author that this fails on your system:
       npm ERR!     node build.js
       npm ERR! You can get their info via:
       npm ERR!     npm owner ls node-sass
       npm ERR! There is likely additional logging output above.

       npm ERR! System Linux 3.8.11-ec2
       npm ERR! command "/tmp/build_1e55a9301b11e6cf6155c90e55124480/vendor/node/bin/node" "/tmp/build_1e55a9301b11e6cf6155c90e55124480/vendor/node/bin/npm" "install" "--quiet" "--userconfig" "/tmp/build_1e55a9301b11e6cf6155c90e55124480/.npmrc"
       npm ERR! cwd /tmp/build_1e55a9301b11e6cf6155c90e55124480
       npm ERR! node -v v0.10.33
       npm ERR! npm -v 1.4.28
       npm ERR! code ELIFECYCLE
       npm ERR! not ok code 0

 !     Push rejected, failed to compile Ember CLI app

double api-prefix necessary with dokku

I just deployed an Ember-CLI app with a Sails.js backend for the first time.
The Sails-backend serves via http://<IP-Adress>:34523 my API-prefix is api/v1 .
So I set API_URL=http://<IP-Adress>:12345 and API_PREFIX=/api/v1/ .

The Ember-Cli application would be available via http://<IP-Adress>:12346. It's making API requests to http://<IP-Adress>:12346/api/v1/... but the nginx of this buildpack is serving them via http://<IP-Adress>:12346/api/v1/api/v1/...

Can you imagine why that is happening?

broken route to API

I get "Error while processing route: animals.index Cannot read property 'find' of undefined TypeError: Cannot read property 'find' of undefined" after my deploy. (Where "animals" is the route and api endpoint.)

I tried setting both API config settings and I've cleared the cache.

The REST API (also on Heroku) is functioning, because I can hit it just fine and it also works fine from the Ember route if running locally (while connecting to Heroku).

Otherwise, I'm not sure how else to debug this?

Example of deploying an API server in the same heroku app

I am admittedly still pretty new to the heroku environment, but would you be able to provide an example of how to use this buildpack to deploy a server (for example an express.js server) alongside the ember application which will handle all the xhr/api requests from the ember app, while nginx still handles the serving of the static assets? Ideally, I would like to keep everything contained within the single repo, and deploying to only one heroku app. Is this a common environment structure in heroku? Or is it generally recommended that you maintain separate apps/instances for the api server and client application?

API Url setup

Can you suggest a good approach for managing an API URL?

I've been testing with the --proxy option with ember serve and it works well. I tried to use API_URL and read the issues about it not using /api/, but the app doesn't even seem like it's directing the model calls to the API. Is this setup expecting the app to set the host in the adapter?

Just need a little guidance, I'm new to this. Thanks!

Build Error: JSParse Error

Hey guys,
What am I doing wrong ?

remote: -----> Building Ember CLI application production distribution
remote:        The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
remote:        version: 0.2.0
remote:        Could not find watchman, falling back to NodeWatcher for file system events
remote:        BuildingThe package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
remote:        Building.Building..Building...Build failed.
remote:        Unexpected token: eof (undefined)
remote:        Error
remote:            at new JS_Parse_Error (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:196:18)
remote:            at js_error (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:204:11)
remote:            at croak (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:678:41)
remote:            at token_error (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:682:9)
remote:            at unexpected (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:688:9)
remote:            at block_ (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:1000:28)
remote:            at /tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:974:25
remote:            at function_ (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:979:15)
remote:            at expr_atom (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:1187:24)
remote:            at maybe_unary (/tmp/build_567d74112d5e3b6cbfd0e10cc2eef339/node_modules/ember-cli-uglify/node_modules/broccoli-uglify-sourcemap/node_modules/uglify-js/lib/parse.js:1357:19)
remote: 
remote:  !     Push rejected, failed to compile Ember CLI app

Can't start container on dokku-alt but works on dokku

I'm using this buildpack to deploy my container to dokku which works as it's supposed to.
I've got a second host running dokku-alt and deployed my Ember-CLI application there as well.
Upon start the only log-message I get via dokku logs <container is:
setuidgid: usage: setuidgid account child

Do you know what might be the problem or how I can get more information regarding this problem?

Make config variables available in environment.js?

My app depends on environment variables with I load from a local .env file with process.env.VAR_NAME in config/environment.js. I expected heroku config vars to be stores in a .env file, but that doesn't seem to be the case. Is there another way I can load config vars with ember-cli-dotenv? Thanks for the help.

Deploying to Heroku results in an application size of 41MB

I am not sure what I am doing incorrectly, so I thought I'd ask here. Running a build --environment=production, results in a dist size of 1.8MB. However, when I deploy to Ember, the final statement says: -----> Compressing... done, 41.3MB

Any idea why?

force HTTPS option

Not really an issue, but for us nginx rookies having a configuration block that we could uncomment if we wanted to force https would be very helpful. ;-)

Redirect non-www (naked domain) to www

I didn't want to go messing with nginx settings myself, so wondered if there's a way for us to redirect naked domains like https://example.com to https://www.example.com, perhaps with a flag of some sort.

Heroku error: Push Rejected, no Cedar-supported app detected

Hey,

I followed the instructions for deploying an ember-cli app to Heroku from the ember-cli main site, and had my push rejected. Any help on this would be appreciated. Thanks! :D

-----> Fetching custom git buildpack... done

 !     Push rejected, no Cedar-supported app detected

To [email protected]:realfeelz-ui.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:realfeelz-ui.git'

Set environment variable a Heroku config variable

It would be nice to load the ember build environment from the Heroku config variables. So you can run staging, production and development.

# bin/compile
status "Building Ember CLI application production distribution"
node_modules/.bin/bower install --quiet | indent
node_modules/ember-cli/bin/ember build --environment production | indent

Proxy url not being used

I have setup my ember heroku app with an API_URL and API_PROXY_PATH as demonstrated in the readme, but my backend api is not receiving any request.

Is there any configuration I need to do aside from setting the heroku configs?

How would I go about using compass?

currently, deploy fails:

       BuildingBuilding.Build failed.
       [broccoli-compass] failed while executing compass command line
       [broccoli-compass] Working directory:
       /tmp/build_6d3bd742-d786-406f-befd-cdc624b00889/tmp/tree_merger-tmp_dest_dir-wfUV9uP1.tmp
       [broccoli-compass] Executed:
       compass compile app/styles/todomvc-speedrun-2.scss --relative-assets --sass-dir app/styles --css-dir assets --output-style compressed --images-dir images --fonts-dir fonts
       [broccoli-compass] stdout:

       [broccoli-compass] stderr:
       /bin/sh: compass: not found

npm ERR! fetch failed

Hi there,

Thanks for making this so awesome. Until I updated to HTMLBars, this built tool acted as a 'set it and forget it' utility that worked really well.

After upgrading to HTMLBars, I get the following when I deploy to Heroku:

Fetching repository, done.
Counting objects: 69, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (65/65), done.
Writing objects: 100% (69/69), 6.46 KiB | 0 bytes/s, done.
Total 69 (delta 45), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> Ember CLI app detected

       PRO TIP: Avoid using semver ranges starting with '>' in engines.node
       See https://devcenter.heroku.com/articles/nodejs-support

-----> Requested node range:  >= 0.10.0
-----> Resolved node version: 0.10.33
-----> Downloading and installing node
-----> Downloading and installing nginx
-----> Adding boot script
-----> Copying configs
-----> Restoring node_modules directory from cache
-----> Pruning cached dependencies not specified in package.json
       unbuild [email protected]
       unbuild [email protected]
-----> Restoring bower_components directory from cache
-----> Installing bower which is required by other dependencies
       npm ERR! fetch failed https://registry.npmjs.org/chalk/-/chalk-0.5.0.tgz
       npm ERR! fetch failed https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.5.tgz
       npm ERR! fetch failed https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.0.8.tgz
       npm ERR! fetch failed https://registry.npmjs.org/glob/-/glob-4.0.6.tgz
       npm ERR! fetch failed https://registry.npmjs.org/lockfile/-/lockfile-1.0.0.tgz
       npm ERR! fetch failed https://registry.npmjs.org/p-throttler/-/p-throttler-0.1.0.tgz
       npm ERR! fetch failed https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.5.tgz
       npm ERR! fetch failed https://registry.npmjs.org/glob/-/glob-4.0.6.tgz
       npm ERR! fetch failed https://registry.npmjs.org/lockfile/-/lockfile-1.0.0.tgz
       npm ERR! fetch failed https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.5.tgz
       npm ERR! fetch failed https://registry.npmjs.org/lockfile/-/lockfile-1.0.0.tgz

      npm ERR! Error: Hostname/IP doesn't match certificate's altnames
       npm ERR!     at SecurePair.<anonymous> (tls.js:1389:23)
       npm ERR!     at SecurePair.emit (events.js:92:17)
       npm ERR!     at SecurePair.maybeInitFinished (tls.js:979:10)
       npm ERR!     at CleartextStream.read [as _read] (tls.js:471:13)
       npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:340:10)
       npm ERR!     at EncryptedStream.write [as _write] (tls.js:368:25)
       npm ERR!     at doWrite (_stream_writable.js:225:10)
       npm ERR!     at writeOrBuffer (_stream_writable.js:215:5)
       npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:182:11)
       npm ERR!     at write (_stream_readable.js:601:24)
       npm ERR!     at flow (_stream_readable.js:610:7)
       npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:642:5)
       npm ERR! If you need help, you may report this *entire* log,
       npm ERR! including the npm and node versions, at:
       npm ERR!     <http://github.com/npm/npm/issues>

       npm ERR! System Linux 3.8.11-ec2
       npm ERR! command "/tmp/build_ac8f91dc1b5ffc363045f35826f1d304/vendor/node/bin/node" "/tmp/build_ac8f91dc1b5ffc363045f35826f1d304/vendor/node/bin/npm" "install" "bower" "--quiet" "--userconfig" "/tmp/build_ac8f91dc1b5ffc363045f35826f1d304/.npmrc"
       npm ERR! cwd /tmp/build_ac8f91dc1b5ffc363045f35826f1d304
       npm ERR! node -v v0.10.33
       npm ERR! npm -v 1.4.28
       npm ERR! not ok code 0

 !     Push rejected, failed to compile Ember CLI app

To [email protected]:rantly-client.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:rantly-client.git'

Here is my bower.config

{
  "name": "rantly",
  "dependencies": {
    "handlebars": "~2.0.0",
    "jquery": "^1.11.1",
    "ember": "components/ember#canary",
    "ember-data": "components/ember-data#canary",
    "ember-resolver": "~0.1.7",
    "loader.js": "stefanpenner/loader.js#1.0.1",
    "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
    "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
    "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
    "ember-qunit": "0.1.8",
    "ember-qunit-notifications": "0.0.4",
    "qunit": "~1.15.0"
  }
}

Do you think this is something going wrong in the build process? It seems possible that the components/ember-data#canary in this bower.config are part of the problem, but I'm not sure.

How To: Leverage Server Directory

Would love to leverage the server directory and some proxy / middleware stuff created in node. Is this not possible with this buildpack?

Instructions on how to build for development

I successfully deployed to Heroku using this buildpack, but when I try to run my app I get JS errors int he console and nothing shows up, ex.:


Uncaught TypeError: undefined is not a function 
    my-prototype.herokuapp.com/assets/vendor-c6931957d1b2bdbfab0eab0bf13183df.js:15

Uncaught TypeError: Cannot read property 'Authenticators' of undefined 
    my-prototype.herokuapp.com/assets/elhub-portal-9d50eb5bd6fc06c10206b997713884a8.js:1

Would be great with some instructions on how to build non-minified on Heroku so I have a chance to debug my app?

thanks!!

Thanks!

Hey there!

This is not exactly an issue, it's just my way of sending a huge THANK YOU, because this buildpack works GREAT and it's helped me big time setting up a big project. I look forward to using it and contributing any way I can

So yeah, thanks again and if you ever pass by Barcelona, the beers are on me

Add application/json mime type

Ajax requests for static .json files are currently being transmitted with a content-type of application/octet-stream, instead of application/json, causing the response to be decoded as a string. In my case, this request is not intended for the api server, its i18n translation data, which I have stored as a static .json file in /public/assets. I'm assuming this could be fixed by adding the necessary type to config/mime.types?

Allow API Proxy to Consume/Return any URL

It would be great if we could make a request to a proxy endpoint (as it is currently) but pass a full request in the querystring. This would leave our options fairly open-ended. In node, I'm currently doing this by getting

req._parsedUrl.query;

Deploying after ember-cli upgrade

Are there protocols to follow after doing an ember-cli upgrade? Because I followed all instructions to upgrade my project locally (from 0.2.1 to 0.2.2) and it works fine - however, when deploying to heroku, even with cache disabled, I get a failed build. Here's the error if it helps:

Caching bower_components directory for future builds
remote: -----> Building Ember CLI application production distribution
remote:        version: 0.2.2
remote:        0.2.2
remote:        
remote:        Could not find watchman, falling back to NodeWatcher for file system events.
remote:        Visit http://www.ember-cli.com/#watchman for more info.
remote:        BuildingBuilding.Building..Building...BuildingBuild failed.
remote:        Path or pattern "bower_components/ember-cli-moment-shim/moment-shim.js" did not match any files
remote:        Error: Path or pattern "bower_components/ember-cli-moment-shim/moment-shim.js" did not match any files
remote:            at Object.multiGlob (/tmp/build_77852d536a76a9e8cbd8c8f0da233c45/node_modules/ember-cli/node_modules/broccoli-kitchen-sink-helpers/index.js:202:13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.