meleyal / backbone-on-rails

A simple gem for using Backbone.js with Rails.
MIT License
808 stars 125 forks source link

Unnecessary Dependencies #60

Closed wingrunr21 closed 9 years ago

wingrunr21 commented 10 years ago

Hi,

57 introduced dependencies into the gemspec that are not needed. activeresource is not a core rails dependency anymore (since v4) and requiring it forces a large dep (since it pulls in rails-observers as well) to be included in the bundle even if it isn't being used. I don't believe this gem requires any dependencies other than railties.

That PR also mistakenly blamed the rails dependency in this gemspec for failing to boot. The more likely cause was in config/application.rb, rails/all was being required instead of the core parts of rails that were needed.

To test this:

rails new foobar --skip-active-record
# Edit Gemfile and add:
# gem 'backbone-on-rails', '< 1.1.1.0'
bundle install
bundle exec rails s

cc/ @brockers

meleyal commented 10 years ago

Pull request welcome

meleyal commented 10 years ago

This should be fixed in fc46e3cc7a385ee361013217eff3d587924829da, could you re-test?

pravi commented 9 years ago

There was a discussion about it on debian ruby list http://debian.2.n7.nabble.com/activeresource-package-td3376255.html

Sam Ruby commented,

"Over time, it the Rails team made changes that made it less useful (particularly at the time that they switched from XML to JSON), and bugs aren't quickly addressed; that combined with the extraction leaves me with the impression that this isn't widely used.

I used to describe its usage in previous editions of my book[2], but I dropped it when Rails 4 came out."

Thanks for the fix.

courtenay commented 9 years ago

This is fixed, but you should bump a minor version so you don't have to install from git.

meleyal commented 9 years ago

Pull request welcome

meleyal commented 9 years ago

Pushed 1.1.2.1