Reputation: 69
I am new to rails and ruby and I wanted to make a small web app using a rails backend (not a good idea considering I am new to both). I am trying to conceptualize the folder structure of rails, and I am confused whether there is a file that runs everything in the folder.. or how does it work? I've used node.js and django (python) and usually I'll have a server file that imports my database and such, but with this rails setup--I am a bit overwhelmed. Any help would be great!
Upvotes: 0
Views: 265
Reputation: 230306
In your rails app, there is no one file that requires and runs all other files. There are a couple of files that do something like this, but they don't load everything.
Instead, rails knows where to look for information when it boots your app. Your database configuration goes to config/database.yml
. Boot-time setup goes to config/initializers/
. And so on. As a rails dev, you're expected to know this. Convention over configuration, they call it.
A good rails book can help with learning these conventions (what goes where).
Upvotes: 8