react_on_rails
react_on_rails copied to clipboard
Incomplete sample application installation instructions
Environment
- Ruby version: 3.0.2 (eventually)
- Rails version: 7.0.0
- Webpacker version: 6.1.1
- React on Rails version: 13.0.2
Expected behavior
Following spec/dummy/README.md should install and start the sample application.
Actual behavior
-
The expected ruby version should be specified either in README or
.ruby-version
.- 3.1.1 failed to start due to https://github.com/rails/rails/issues/43998 (even though it's a warning), fixed in Rails 7.0.2.
- 3.0.3 failed to start due to https://github.com/Shopify/bootsnap/issues/378, fixed in bootsnap 1.9.2/3.
- 3.0.2 works, but
rake test
doesn't due to https://github.com/pry/pry-doc/issues/113, fixed in pry-doc 1.2.0.
-
I found additional steps to be necessary:
-
bundle install
in bothroot
andspec/dummy
. -
yarn rescript:build
beforeforeman
because it doesn't build the dependencies. In my accompanying PR this is a separate step, but maybe a better way would be to add-with-deps
in https://github.com/shakacode/react_on_rails/blob/0e96cf8a4c6779daf2c671974e93598134162587/spec/dummy/package.json#L81?
-
-
Procfile.spec
(mentioned under "Creating Assets for Tests") currently doesn't exist. -
bundle exec rspec
both in root and spec/dummy produces some failures in addition to "ruby/3.0.2 isn't supported by this pry-doc version" from 1.3, but it could be because of the missing assets or some other problem with my setup. -
After posting this, I found more information on setup in CONTRIBUTING.md. It should probably be linked from the README instead of duplicating information.
@alexeyr AWESOME work! Keep going!
hey @alexeyr -- I think I'm gonna work on this a little this weekend if you want to pair up. not sure if you were building a jsbundling app or an importmap app under Rails 7 (you don't specify), but I am going for a solution using esbuild through JSBundling.
if you have an example app from the attempts above, I will pull it and take a look if that's helpful.
as well, from what I understand there's a CSS collision if you use both JSBundling and CSSbundling, so I'm not actually sure how to get esbuild to compile the React CSS and also how to get SCSS to compile the application CSS. (that's where I'm stuck). I will start a separate issue this weekend with my own notes.
@jasonfb Sorry, I won't be able to. And anyway, my changes were basically limited to documentation in #1443, I didn't even start updating other dependency versions.
@alexeyr-c -- ok very good I think I'm a different path anyway.
@ahangarha if your recent work resolved this issue, then please close this.
@Judahmeek Not actually. I couldn't make it work. I get a never-ended loading page, with no error or any helpful message in the terminal.
I believe #1443 resolved most of this.