-
Notifications
You must be signed in to change notification settings - Fork 9
Development Plan
I just wanted to brain dump my ideas about features and the direction here so we can start discussing it.
Railcar is powered by a set of existing, proven technology:
- Homebrew
- RbEnv
- ruby-build
We can rely on the communities around these projects to maintain the important moving pieces related to installing, building, and updating Ruby and related libraries. This approach takes a lot of maintenance load off of our project while also giving us the benefit of all the code for these projects that exists.
Currently, we install Homebrew and use that to install and manage RbEnv and ruby-build. Ruby versions will be maintained in another directory inside the app bundle so we can manage each independently (this is currently y top TODO). Once a version is installed, we create a shell initializer script that will set RbEnv to the proper version and add our Homebrew to the path (in case we need to install any third party libraries). When an app or console instance is launched, we seed the shell with this initializer before doing anything.
At this time, our initial setup is to build and install of this on the first run (i.e., download and compile everything), but the architecture is such that if we distributed a bundle with the requisite pieces already in place in binary form, the app would skip this initial setup and merrily proceed along using whatever Ruby and gems are installed. And it doesnt much care what version is there; we could distribute a JRuby version, a Rubinius version, or even a Rails 2.x maintenance version.
Our next steps will consist of stabilizing the current functionality and making it a bit more general, but beyond that, we have a few features:
The next step will be to build out a skeletal main UI and then add a simple version management UI, since this is closely related to the current development work. Ideally, we will provide a screen which presents the various Ruby versions with an explanation of each (e.g., we might explain that JRuby is ideal for integrating with Java applications and so on). That way newer users could install versions that seem interesting to them or relevant to their current development environment.
Of course, we'll want to add Locomotive-like application generation/management. Apps should not be required to be generated by Railcar, but we should offer the option, with a nice UI for generating them with different database providers, with/without bundler or Sprockets, and so on (basically all the options rails new
gives us).
When launched, each app will be given its own window for management. From there, we'll be able to launch a console in its directory, dig in logs (maybe offer some insight into error logs later on?), and so on.
I'd like to use brew to manage database installs. I think this is the smartest way to do it and we can simply wire in a quick method to install databases from a preconfigured menu. Again, I'd like to provide a bit of information, pros/cons, etc. like we would do with Ruby versions. Currently, the bootstrapping process does not include a database provider since the default for Rails app is Sqlite. This should work fine for most people's learning needs until they're ready to expand.
The benefit of using brew and RbEnv is that it would be stupid simple to push this out to a system-wide installation. Simply run the one-line installer, copy the Cellar over to the standard brew location, and that's setup. Install RbEnv, copy our versions over to the new RBENV_ROOT, run rbenv init and rbenv rehash, and done. We'll need to add a flag or some checks of some sort of see if they've run this system-wide installation, but that shouldn't be hard at all.