By now you've used many different gems with Rails and this exercise will have you connect previous knowledge with new knowledge as you get a chance to use the react-rails
gem. This gem allows you to build React components as a part of your Rails JavaScript and serve it in a component, react_component
, to be used in a regular ERB file.
To run the project locally, copy up and running follow these simple example steps :
- First of all make sure you have both
Ruby
&Rails
installed in your machine (else You can installRails
just with this simple commandgem install rails
) - clone the project with the following command line :
$ git clone git@github.com:Laylo309/hello-rails-react.git
- Then go to the right folder
$ cd hello-rails-react
$ bundle
and run to install npm package
$ npm install
make sure the database is up and running.
$ rails db:create
When you will add migration file then, you can add command like
$ rails db:migrate
When you will add seeds file then, you can add command like
$ rails db:seed
- Finaly run
rails s
and visit http://localhost:3000/ in your browser!
- Ruby on Rails
- PostgreSQL
- React
👤 Laylo Khodjaeva
- GitHub: @Laylo309
- Twitter: @Laylo
- LinkedIn: LayloKhodjaeva
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Inspiration 💘
- Microverse program ⚡
- My standup team 😍
- My family's support 🙌