Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rails g ember-cli:heroku #230

Merged
merged 1 commit into from
Oct 30, 2015
Merged

Add rails g ember-cli:heroku #230

merged 1 commit into from
Oct 30, 2015

Conversation

seanpdoyle
Copy link
Contributor

To configure your Ember CLI Rails app to be ready to deploy on Heroku:

  1. Run rails g ember-cli:heroku generator
  2. Add the NodeJS buildpack and configure NPM to include the
    bower dependency's executable file.
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-nodejs
heroku config:set NPM_CONFIG_PRODUCTION=false

def bower_path
@bower_path ||=
Helpers.which("bower") ||
Rails.root.join("node_modules", ".bin", "bower")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 2 (not 0) spaces for indenting an expression in an assignment spanning multiple lines.

@seanpdoyle seanpdoyle force-pushed the sd-heroku branch 4 times, most recently from 3cdcb89 to 5e48aef Compare October 30, 2015 12:43
@@ -78,6 +78,10 @@ def initialize(app)
app_options.fetch(:tee_path){ configuration.tee_path }
end

define_path :bower do
app_options.fetch(:bower_path){ configuration.bower_path }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing to the left of {.

@seanpdoyle seanpdoyle force-pushed the sd-heroku branch 2 times, most recently from 9613ae0 to a43469f Compare October 30, 2015 12:51

namespace "ember-cli:heroku"

gem "rails_12factor", group: [:staging, :production]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing a strange error:

/Users/seanpdoyle/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/rubygems_integration.rb:292:in `bloc
k in replace_gem': rails_12factor is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

gem is a generator method, but this looks like it's using the version that found in the Gemfile

@seanpdoyle seanpdoyle force-pushed the sd-heroku branch 4 times, most recently from 6f19fb3 to e4453e3 Compare October 30, 2015 13:42

```sh
heroku config:set NPM_CONFIG_PRODUCTION=false
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the recent docs it looks like you can just use heroku buildpacks:add and don't need to declare the Multi buildpack anymore.

@seanpdoyle seanpdoyle force-pushed the sd-heroku branch 3 times, most recently from 89bf511 to b320845 Compare October 30, 2015 14:06
@@ -2,6 +2,8 @@ master
------

* Drop support for Ruby `< 2.1.0` and Rails `4.0.0, < 3.2.0`
* Introduce `rails g ember-cli:heroku` generator to setup a project for

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this comment and then Github had some saving problems.

How about "to set up a project for Heroku deployment"? ("setup" is a noun, "set up" is a verb)

@tute
Copy link

tute commented Oct 30, 2015

Looks great to me! I'm excited about this gem. :)

To configure your Ember CLI Rails app to be ready to deploy on Heroku:

1. Run `rails g ember-cli:heroku` generator
1. [Add the NodeJS buildpack][buildpack] and configure NPM to include the
   `bower` dependency's executable file.

```sh
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-nodejs
heroku config:set NPM_CONFIG_PRODUCTION=false
```

[buildpack]: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app#adding-a-buildpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants