18 ms·
An interesting tweet by Sam Saffron: "@dhh this is just a bit too much https://github.com/rails/rails/blob/master/rails.gemspec#L28 https://github.com/rails/ra
by shimonamit 11y ago
An interesting tweet by Sam Saffron:
"@dhh this is just a bit too much https://github.com/rails/rails/blob/master/rails.gemspec#L28 https://github.com/rails/rails/blob/master/rails.gemspec#L28 … now every Rails install requires redis, eventmacine, celluloid and faye"
https://twitter.com/samsaffron/status/678701348297158657 https://twitter.com/samsaffron/status/678701348297158657
- VeejayRampay 11y agoI don't think there's even been a point in Rails history where you've been forced to install something. I think those are all ActionCable dependencies, which I'm pretty sure you can deactivate (not every app requires the capability it offers).
- cristianbica 11y agoThe only way to deactivate it is from your app's Gemfile (remove gem "rails" and add all the active/action gems individually). For new apps there's a flag "--skip-action-cable". In the future probably the faye/redis will probably be made adapter based (similar to ActiveRecord and ActiveJob) and exctracted in a gem. So if you want actioncable you'll have to add a "actioncable-faye-adapter" gem to your Gemfile.
- aaronem 11y agoEventmachine and Celluloid required by default? Huh. I suppose that's preferable to just installing node.js directly, although I confess I can't see how. /s
- aikah 11y ago> Eventmachine and Celluloid required by default? Huh. I suppose that's preferable to just installing node.js directly, although I confess I can't see how. /s AFAIK nodejs is already an optionial rails dependency for the asset pipeline.
- Rafert 11y agoIt is through ExecJS[1] which allows different Javascript backends. [1]: https://github.com/rails/execjs https://github.com/rails/execjs
- why-el 11y agoKnowing how responsive the community usually is this will be optional in no time. I think the team prioritized a launch by the deadline they set over issues like this.
- matthewrudy 11y agoDHH did suggest it would become a runtime check, vs a gem dependency last week. But it seems to have made it into the beta as a gem dependency. https://github.com/rails/rails/pull/22585#discussion_r47515413 https://github.com/rails/rails/pull/22585#discussion_r475154...
- inopinatus 11y agoRails 5 is a bloat too far for my liking as well. ActionCable's dependency on redis is too fat a pill to swallow, especially given that some of the existing ActiveRecord backends have pub/sub capabilities. The result is that I'm learning Elixir/Phoenix and having the same reaction Dave Thomas describes in his new book, that is, finding anew the joy of programming.
- mbrain 11y agoDo you see a future in Elixer/Phoenix? And how do you like it?
- chippy 11y agoI often do a word count of languages and technologies in the monthly "Who's hiring" posts here. Elixir/Phoenix gets less mentions than Erlang - often there would be at least one position that says they use Elixir, sometimes none.
- awinder 11y agoSmall point: this is how all popular languages once started. Much like the stock market, there's value in being balanced on the forefront of a technology along with a solid footing in an established technology. Having no balance in either direction is the only "risky" career move.
- davidw 11y agoI once ran a language popularity site thing, and I think jobs are something of a trailing indicator. It takes a while for people to hire for whatever hot new thing is out.
- Xixi 11y agoAnother way to look at it is that Erlang has been there for a long time (longer than both Python and Ruby), and it is not going away soon. Elixir and Phoenix may or may not last, that I don't know, but they are a joy to work with.
- 11y ago
- fbernier 11y agoJust a small correction to this tweet, it doesn't use faye but faye-websocket which is just a websocket client/server which represents a tiny part of the Faye messaging system.
- jguimont 11y agoYou just need to comment the line in the Gemfile and you are done, no more dependencies. What is the big deal really.
- nwjsmith 11y agoThat isn't the case for ActionCable, which will become a dependency of the 'rails' gem [1]. You'll have to unbundle the rails gem in your Gemfile, then require the frameworks you want one-by-one in application.rb [1]: https://github.com/rails/rails/blob/master/rails.gemspec#L28 https://github.com/rails/rails/blob/master/rails.gemspec#L28
- nateberkopec 11y agoYou can just add each Rails framework to your Gemfile and be done. `require "rails/all"` catches load errors, so you don't need to require the frameworks manually in application.rb. https://gist.github.com/nateberkopec/1184c81a92c10d84d779 https://gist.github.com/nateberkopec/1184c81a92c10d84d779
- doomslice 11y agoMinor note -- it doesn't appear like it requires faye, but rather faye-websocket, which is just a particularly amazing websocket wrapper that sprung out of the faye project.
- spoiler 11y agoNot to mention, I don't really see all the fuss about EventMachine. I worked with it a few years ago, and it had some very subtle bugs that caused me hours upon hours of headache; it would deadlock under more stressful workloads, or it would simply ignore some packets (even though the proxy server I wrote for debugging it received them just fine and forwarded them). I just hope that they resolved some of them. And Rails has always been a dependency soup, so I am not too surprised to see stuff piled onto the ever-growing list (I have nothing against Rails, I even use it, I'm just not too happy about the bloatyness).
- hackercomplex 11y agoI would have rather seen Celluloid::IO being used personally but even that has it's quirks.
- regularfry 11y agoNow we've got a dependency on both EM and Celluloid. Yay.
- nateberkopec 11y agoWhile you may disagree with DHH's reasons, you don't have to install or use ActionCable in Rails 5. Here's a few ways to avoid it: https://gist.github.com/nateberkopec/1184c81a92c10d84d779 https://gist.github.com/nateberkopec/1184c81a92c10d84d779
- regularfry 11y agoYou still get redis as a dependency if you `--skip-action-cable`. Seems... odd.