Skip to content

rails g ember:bootstrap fail if don't exists application.js file #64

@javierav

Description

@javierav

Tested in ember-rails 0.5.0 and 0.6.0

If app/assets/javascripts don't exists or not have any application.js file inside, this operation fail.

$ rails g ember:bootstrap
[EMBER-RAILS] ember.variant was not found in your current environment
insert app/assets/javascripts/application.js
/Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/actions/inject_into_file.rb:99:in binread': No such file or directory - /Users/javierav/code/ember-demo/app/assets/javascripts/application.js (Errno::ENOENT) from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/actions/inject_into_file.rb:99:inreplace!'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/actions/inject_into_file.rb:60:in invoke!' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/actions.rb:95:inaction'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/actions/inject_into_file.rb:31:in insert_into_file' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/ember-rails-0.6.0/lib/generators/ember/bootstrap_generator.rb:17:ininject_ember'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/task.rb:27:in run' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:120:ininvoke_task'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:126:in block in invoke_all' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:126:ineach'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:126:in map' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:126:ininvoke_all'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/group.rb:238:in dispatch' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/base.rb:408:instart'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.5/lib/rails/generators.rb:171:in invoke' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.5/lib/rails/commands/generate.rb:12:in<top (required)>'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:in require' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:inblock in require'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:236:in load_dependency' from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:251:inrequire'
from /Users/javierav/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.5/lib/rails/commands.rb:29:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions