irhasalba / tdd-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails on Replit

This is a template to get you started with Rails on Replit. It's ready to go so you can just hit run and start coding!

This template was generated using rails new (after you install the rails gem from the packager sidebar) so you can always do that if you prefer to set it up from scratch. The only had two make config changes we had to make to run it on Replit:

  • bind the app on 0.0.0.0 instead of localhost (see .replit)
  • allow *.repl.co hosts (see config/environments/development.rb)
  • allow the app to be iframed on replit.com (see config/application.rb)

Running the app

Simple hit run! You can edit the run command from the .replit file.

Running commands

Start every command with bundle exec so that it runs in the context of the installed gems environment. The console pane will give you output from the server but you can run arbitrary command from the shell without stopping the server.

Database

SQLite would work in development but we don't recommend running it in production. Instead look into using the built-in Replit database. Otherwise you are welcome to connect databases from your favorite provider.

Help

If you need help you might be able to find an answer on our docs page. Alternatively you can ask in the community. Feel free to report bugs here and give us feedback here.

About


Languages

Language:Ruby 84.7%Language:HTML 13.2%Language:CSS 1.7%Language:Nix 0.3%Language:JavaScript 0.1%