Generate your Rails project the easy way!
🐞
Report a Bug
🙋♂️
Request Feature
Welcome to our rails template meant to be used for Microverse's projects on Rails! Generate your Rails project the easy way!
- Setup a complete Rails app wit a single script or few commands
- Makes
rspecready to use - Uses
bcryptso you can start diggest-ing your passwords - Spins up home route on request
- Sets
stickleron the repo - Sets
rubocoprules - Gives you a great README to start with
- Easy to generate projects in GitHub
- Meant to be useful for Microverse students and anyone that wants a Rails' App
The script requires you to have:
- Some compatible Linux OS (I've tested on Debian/Ubuntu derivatives)
nodejslatest LTS versionruby2.5+rails5.2+gitand normal development stuff- Basic terminal and script knowledge
Now, this is meant to be used as a GitHub Template, so please don't clone this repository (unless you want to collaborate), use this button instead.
Please note that this is for linux only. On windows use WSL or visit this link, then run commands from your Terminal.
After you used the template in your project, clone your project in you PC and open a terminal inside your project:
git clone <your-repo-link>
cd <Your-project>
First run the script provided:
chmod -x ./run_me.sh
bash ./run_me.sh
Answer the following prompts
Do you wish to generate a root controller? (y/n)
The idea is to start with some code to play with, but you can start without a root controller. If you decide to create a root controller you will be asked:
What do you want to call it?
The usual name is home but you can get creative.
Then all the project basic files will be generated for you. The last step of the script is to launch a server, so at the end you should see something like this:
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.5-p157), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
If you open on a browser http://localhost:3000 you should see the following text:
Find me in app/views/home/show.html.erb
Last but not least the script remove this README and substitute for the renamed README.TEMPLATE (meant to be used for Microverse Projects), so if you are running each command instead of using the script make the change of READMEs manually.
If the script fails try to run from the folder:
rails new . < === don't forget the point at the end!!
rails g rspec:install < === to make rspec available!
If it continue failing maybe you don't have the correct versions of any of the pre requisites, so try to install all necesary packages/gems before running the script. Also you can tell us and we'll try to address the issue.
🤝 Contributions, issues and feature requests are welcome! Feel free to check the issues page.
🤗 Give a ⭐️ if you like this project!
Icons from:
Ruby Programming Language icon by Icons8
📝 This project is licensed under the MIT
Feel free to fork this project and improve it