react_on_rails icon indicating copy to clipboard operation
react_on_rails copied to clipboard

Incomplete sample application installation instructions

Open alexeyr opened this issue 2 years ago • 4 comments

Environment

  1. Ruby version: 3.0.2 (eventually)
  2. Rails version: 7.0.0
  3. Webpacker version: 6.1.1
  4. React on Rails version: 13.0.2

Expected behavior

Following spec/dummy/README.md should install and start the sample application.

Actual behavior

  1. The expected ruby version should be specified either in README or .ruby-version.

    1. 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.
    2. 3.0.3 failed to start due to https://github.com/Shopify/bootsnap/issues/378, fixed in bootsnap 1.9.2/3.
    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.
  2. I found additional steps to be necessary:

    1. bundle install in both root and spec/dummy.
    2. yarn rescript:build before foreman 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?
  3. Procfile.spec (mentioned under "Creating Assets for Tests") currently doesn't exist.

  4. 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.

  5. 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 avatar Apr 15 '22 08:04 alexeyr

@alexeyr AWESOME work! Keep going!

justin808 avatar Apr 16 '22 09:04 justin808

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 avatar May 13 '22 15:05 jasonfb

@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 avatar May 13 '22 21:05 alexeyr-c

@alexeyr-c -- ok very good I think I'm a different path anyway.

jasonfb avatar May 18 '22 17:05 jasonfb

@ahangarha if your recent work resolved this issue, then please close this.

Judahmeek avatar Jan 14 '23 05:01 Judahmeek

@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.

ahangarha avatar Jan 14 '23 06:01 ahangarha

I believe #1443 resolved most of this.

Judahmeek avatar Feb 15 '23 05:02 Judahmeek