Questions tagged [react-on-rails]

112 questions
0
votes
1 answer

Nested Route React working with a Local scoped variable?

Yeah so I'm not sure why this is working but somehow it is? I'm very new to react and would just like to understand what it is I'm doing wrong or how to correct. Here's my react code snippet: this.state = { user_ledgers: [], paginator: {…
Sachin
  • 27
  • 5
0
votes
1 answer

Uploading image with Uppy trough Shrine return 405 Method Not Allowed

I am trying to use Ruby On Rails as my backend, and gems like ReactOnRails and Shrine, in addition, I use package Uppy to upload the image to AWS S3 So far everything working fine until I trying to upload the image through Uppy which should transfer…
GYTO
  • 440
  • 1
  • 10
  • 23
0
votes
1 answer

How to integrate Redux DevTools with ReactOnRails

I'd like to integrate Redux DevTools (https://github.com/zalmoxisus/redux-devtools-extension) with ReactOnRails (https://github.com/shakacode/react_on_rails) project. I'm not sure where I can put window.__REDUX_DEVTOOLS_EXTENSION__ &&…
0
votes
1 answer

React on Rails REST API vs Controller Props

I am trying to decide what is a better approach to manage Ruby on Rails and React in my application. I am using RoR 5 and gem react_on_rails which makes everything works fine for me. The question is if I should build a REST API with RoR and then…
GYTO
  • 440
  • 1
  • 10
  • 23
0
votes
1 answer

Old component retains state on back button

I have a link in a modal that goes to a new page, and I can't seem to reset the state of the component with the modal when directing to that page. The component with the modal seems to be keeping its state after directing to the new page, because…
Doug
  • 1,517
  • 3
  • 18
  • 40
0
votes
0 answers

Rails CSS not working on a brand new project

I'm pulling my hairs out here. I just created a react on rails app. No styling is working at all. This is a brand new project... Solutions tried: Precompiling in assets.rb Linking stylesheet directing in the html.erb in the head <%=…
GarrettJMU
  • 175
  • 1
  • 2
  • 12
0
votes
1 answer

Accessing Devise user fields in React with React on Rails

I'm trying to access the Devise attribute invitation_accepted_at in my Users objects in Users#index. The devise attributes are returned in my controller method, as well as to the Rails view. But are being lost when passed over to React in the JSX…
Shelby S
  • 400
  • 4
  • 17
0
votes
2 answers

change localhost port number in a rails application

I just started learning RoR as a backend technology for React. I came across a tutorial that uses 'react-rails' and it chooses the localhost port number to be 3000 for my development environment by default. Is there any way to change this default…
Raj
  • 3,637
  • 8
  • 29
  • 52
0
votes
1 answer

Rails + Webpack: Errno::EPERM at / (Operation Not Permitted)

I am trying to run a rails app that uses react and webpacker. All of the node_modules are installed through yarn. When I boot up the local server using foreman, I get the error: Errno::EPERM - Operation not permitted -…
danielsmith1789
  • 1,056
  • 1
  • 12
  • 25
0
votes
1 answer

Post not working React + Rails

When I try to make a post I'm getting a 400 (Bad Request) Error. I'm trying to post a new Player into a Team. My controller def create @teams = Team.find(params[:team_id]) @players = @teams.players.new(player_params) render json:…
mwlai
  • 71
  • 1
  • 9
0
votes
0 answers

Api key must be initialized (ArgumentError)

So, I am currently contributing to open source (React on Rails app). I am getting the following error when I run: foreman start -f Procfile.static The output on the terminal is: Rajs-MacBook-Pro:Empirical-Core raj$ foreman start -f…
Raj
  • 3,637
  • 8
  • 29
  • 52
0
votes
1 answer

react_on_rails how to render other views from a component without using library

I've created a rails project and then integrated react with it using react_on_rails gem. I've made one component and placed it inside my new.html.erb using react_component helper method. Whenever this erb view renders I get the react component and…
0
votes
1 answer

prerendering in react_on_rails app is throwing error

Whenever I switch prerendering to true for my react component in my rails view I'm getting this error undefined local variable or method `e' for ReactOnRails::ServerRenderingPool::Exec:Class I've found on the shakacode site that there's a typo in…
0
votes
1 answer

` Unexpected token 'const'` webpack and babel not transpiling code in WEBPACK VAR INJECTION section

We have a Rails 5 project that uses react_on_rails, and thus webpack (via the webpacker gem) and babel. We are running testing using capybara webkit and we are getting this error when using the webkit_debug javascript…
DaKaZ
  • 925
  • 1
  • 7
  • 18
0
votes
1 answer

React on rails error importing CSS

Hello im getting this error when i do an import 'styles.css' on my react on rails app Uncaught Error: Module build failed: ModuleBuildError: Module build failed: Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-smart-import' at…
mdiaz00147
  • 152
  • 2
  • 11