Project Name

This is a simple demo of how to integrate Ruby on Rails and React

Built With

  • Ruby on Rails
  • React
  • Git

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • computer

Setup

  • Run git clone https://github.com/jheart-vic/Hello-React-Rails

  • Run cd Hello-React-Rails

  • Run bundle install

  • Run npm i

  • Run npm run build(having issues building the app Runnpm install --save-dev webpack webpack-cli)

  • Run rails server

  • Note Make sure to have the database as postgres and change the password to your database password

To Create a new App

  • rails new -j webpack my_new_rails_app

  • RunTo add it to an existing rails app:

  • Add jsbundling-rails to your Gemfile with gem 'jsbundling-rails' if it's not there

  • Run ./bin/bundle install

  • Run ./bin/rails javascript:install:webpack

  • To Install needed node dependencies

  • yarn add react react-dom or npm install react react-dom

  • yarn add @babel/core @babel/preset-env @babel/preset-react babel-loader --dev or npm install @babel/core @babel/preset-env @babel/preset-react babel-loader --dev

Author

👤 Victor Akabueze

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

📝 License

This project is MIT licensed.