7 ms·
Don't get me wrong, I love Rails, and have been using it off and on since Rails 2. It's a really good framework, and for someone like me who needs to stand up
by steve_gh 3y ago
Don't get me wrong, I love Rails, and have been using it off and on since Rails 2.
It's a really good framework, and for someone like me who needs to stand up a website from time to time it really is the path of least resistance.
What bugs me is the pain of setting up a new laptop to run Rails. I need node, which means npm. I'm a backend guy, I don't understand how to set up node, what order to do things in, etc. I do it rarely enough that it always seems a fight. Eventually I get it done, but I'm never sure why it finally all comes together.
An installer that puts together all the requirements so my rails just works would be great. The rvm installer will set up rails on top of ruby but won't set up the node system underneath it.
- jgilias 3y agoHave you used nvm? It’s pretty painless in my experience.
- JamesBrooks 3y agoIf you opt to use import-maps I think you can get away without needing node these days, though then you're using import maps and have to deal with that can of worms.
- roboben 3y agothats the whole premise of rails7: dropping the node dependency...
- abigail95 3y agoWhat are you comparing Node to? Other typical back ends are more complicated (except Go) Java, C#, Python for example
- lolinder 3y agoFor Java, sdkman is great—essentially as convenient as nvm. Python is a disaster.
- metaltyphoon 3y agodotnet new webapi - for apis dotnet new webapp - for crud dotnet new react - using react How is that complicated?
- keyle 3y agoI've never done rails, please tell me, why does "ruby on rails" need nodejs for? Also it's fairly easy to install node. Too easy in fact. I wish it was much harder, and required a degree.
- teaearlgraycold 3y agoRails lets you use modern JS frontend tools.
- deleted 3y ago[deleted]
- gls2ro 3y agoIt lets you use modern JS frontend tool but you can also choose importmaps route that comes as default in Rails 7 so there is no need for nodejs and you can also say goodbye to the big folder "node_modules"
- ulizzle 3y agoIt’s still a problem, especially in mid size or large apps. Unless you have someone taking care of the bootstrap process, it inevitably breaks down. Eventually only one person can get it working so I suppose it’s job security so perhaps it’s not so bad That’s for every framework though, Rails isn’t that bad, relatively
- tauchunfall 3y ago>I'm a backend guy, I don't understand how to set up node I understand that Node is mostly known as a frontend tool and Rails uses it for that, but as far as I remember Node was as least initially developed to bring JavaScript runtime to backends. Even without a package manager node is just a node.exe under Windows, and I think you just have to download and unpack npm and then put node and npm into your PATH environment variable.
- bnt 3y agoI recently set up a new Win11 laptop and all it took was download Node and install it via the installer. You’re up and running in 90 seconds. Yarn was another 30 seconds (npm i yarn). Even Ruby works well with RubyInstaller, and you can normally develop Rails without WSL if you really want to.
- 0xblinq 3y agoThe Ruby/Rails community is one of the best and most friendly I've seen. But the worst part of it, by far is the hate for JavaScript. JavaScript is just a tool, like any other. And it's a very important one like it or not. And like it or not it's going to stay here for a long time. Just have a bit of an open mind and try to learn the basics at least, it will make things easier.
- brigandish 3y agoWhat led you to think that Ruby devs don't know the basics of Javascript?
- 0xblinq 3y agoI don't think that. My last sentence on the parent message was directed to the comment I was replying to (which said they couldn't set up node properly). What I do think is that there's a huge % of Rails devs that hate on JavaScript as if it were some kind of enemy to beat or something, and often that leads to people not wanting to learn it properly.
- andrei_says_ 3y agoA couple of Rails versions ago, I had to deal with webpack and that surely felt like an enemy trying to fight me at every step. Luckily, I no longer need a PhD in webpack or node packages in order to run rails s successfully.
- gls2ro 3y agoHere is what bothered me with JS and it might sound very stupid: The idea to have a node_modules that has tens of thousands of folders/files for the simplest package that I needed to install. Ruby has gems, but they have few files, I can easily know where to go to understand how something works or add a debugger. But just trying to read the name of all those seemed for me always like a task that I dont want to do. The language itself letting aside some warts is good, can be enjoyed and good code maybe can be written.
- jot 3y agoOne of these should help with setting up a new laptop to run Rails: https://rails.new https://rails.new https://rubyonmac.dev https://rubyonmac.dev
- mrgill 3y agoCool, but why not just use Docker? 2-4GB extra ram overhead and some initial learning curve, add a decent Makefile and.. never worry about local env ever again. Switch back and forth between Mac, Windows, Linux like it's nothing.
- gls2ro 3y agoAdd to this that Rails 7.1 comes with a pre-generated Dockerfile that works quite well out of the box
- arcanemachiner 3y ago'asdf' (a version manager) is great for managing nodejs. I haven't dealt with Ruby before, though. https://asdf-vm.com/ https://asdf-vm.com/
- michaelteter 3y agoasdf handles Ruby just fine also. I use asdf for Ruby, Python, Elixir/Erlang, Node, and probably a couple more that I've forgotten.
- 0xblinq 3y agoasdf is awesome. It renders useless each language's own version manager.
- gls2ro 3y agoThe latest version of Rails 7 works out of the box with importmaps so no node (nor yarn or any other version manager) is required.