Ruby on Rails - react installation for rails using rails_react gem- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
react installation for rails using rails_react gem
Add react-rails to your Gemfile:
gem 'react-rails'
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
And install:
bundle install
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
Next, run the installation script:
rails g react:install
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
create a components.js manifest file and a app/assets/javascripts/components/ directory, where you will put your components place the following in your application.js:
//= require react
//= require react_ujs
//= require components