jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 201 forks source link

Invalid "dir" value in build config breaking build #165

Closed jezstephens closed 10 years ago

jezstephens commented 10 years ago

My build is broken after 9b89d796ea2dbc85984ee91f2f3058ea2b150fc1:

Asset compilation with node failed with error:

{ [Error: TypeError: Object #<Object> has no method 'indexOf'
    at Function.build.makeAbsPath (/home/jez/src/maj/meet-and-jam/vendor/bundle/ruby/2.0.0/bundler/gems/requirejs-rails-9b89d796ea2d/bin/r.js:26454:18)
]
  originalError: [TypeError: Object #<Object> has no method 'indexOf'] }

The path config in rjs_driver.js is being rendered incorrectly:

baseConfig = {
   // ...
  "dir": {"path":"/home/jez/src/maj/meet-and-jam/public/assets"}
};

Should be:

baseConfig = {
   // ...
  "dir": "/home/jez/src/maj/meet-and-jam/public/assets"
};
carsomyr commented 10 years ago

Duplicate of #166.