Denis

Joined

1,310 Experience
12 Lessons Completed
0 Questions Solved

Activity

Posted in How to Deploy Rails to Fly.io Discussion

Just trying to use rails new decisionmaker -j esbuild --css tailwind --database=postgresql and deploy as is and hit 20 2.356 sh: 1: yarn: not found
20 2.356 rails aborted!
20 2.356 jsbundling-rails: Command build failed, ensure yarn is installed and
yarn buildruns without errors
20 2.356 /app/vendor/bundle/ruby/3.1.0/gems/jsbundling-rails-1.0.3/lib/tasks/jsbundling/build.rake:5:in
block (2 levels) in '`

Anyone successfully deploy to fly.io with esbuild/tailwind like this?

Posted in How to Deploy Rails to Fly.io Discussion

Has anyone hit this problem: failed - Failed due to unhealthy allocations ?

Posted in How to Deploy Rails to Render Discussion

Nice, that may be the solution, thank you! Now, to be clear, I'm not using docket other than local, so this is all using this video, straight up. I'm inches away from deploying. Always the case isn't it! Thanks for helping Tim!

Collin's advice is GOLD. Even if you have an existing app, use this to deploy the simplest beginning of it and THEN add-on.

Spent the last 2 weeks trying to deploy on render, fly.io, digital ocean... nothing worked for all different reasons. So, I followed his advice and I can live again! Thank you Collin. You guys are the tide that raises all rails boats.

Successfully deployed also using tailwind:

  1. rails new app_name -j esbuild --css tailwind --database=postgresql

  2. Added this to package.json:
    { "name": "app", "private": "true", "dependencies": { "@hotwired/stimulus": "^3.0.1", "@hotwired/turbo-rails": "^7.1.0", "autoprefixer": "^10.4.1", "esbuild": "^0.14.9", "postcss": "^8.4.5", "tailwindcss": "^3.0.8" }, "scripts": { "build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds", "build:css": "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css" }}

  3. Ran through this tutorial but got stuck:
    Oct 27 10:47:53 PM  ==> Generating container image from build. This may take a few minutes...
    Oct 27 10:49:43 PM  ==> Uploading build...
    Oct 27 10:50:13 PM  ==> Build uploaded in 24s
    Oct 27 10:50:13 PM  ==> Build successful
    Oct 27 10:50:13 PM  ==> Deploying...
    Error getting active endpoint: revision.serving.knative.dev "srv-cddj6eien0hmkdfelnig-kn-00001" not found

  4. Trying minor update and redeploying.

DEPLOYED!!! ::YAY:

Posted in How to Deploy Rails to Render Discussion

Yes, I use docker locally without any issues. Is there a setting to change to be able to create this folder?

Posted in How to Deploy Rails to Render Discussion

I didn't explicitly add it no. I've tried adding it to render-build.sh but it seems to be ignoring what I add in there after the standard:

bundle install
bundle exec rake assets:precompile
bundle exec rake assets:clean
bundle exec rake db:migrate

I'm thinking the assets:precompile triggers it

Tried to add mkdir /node_modules && chown ruby:ruby -R /node_modules /app before the precompile and got the same scenario: mkdir: cannot create directory ‘/node_modules’: Read-only file system

Posted in How to Deploy Rails to Render Discussion

Now I can't seem to get yarn up and running:
error An unexpected error occurred: "EROFS: read-only file system, mkdir '/node_modules'".
jsbundling-rails: Command build failed, ensure yarn is installed and yarn build runs without errors. hmm...

Posted in Github actions & RAILS_MASTER_KEY

I've hit this same issue deploying to render on another video, where you able to resolve the issue Dominik?

Posted in How to Deploy Rails to Render Discussion

Love this info, I'm so close to deploying successfully. All but the web container. I keep getting ActiveSupport::MessageEncryptor::InvalidMessage, ArgumentError: key must be 16 bytes. All answers point to regenerating the master.key and enc file. I do so, update the RAILS_MASTER_KEY with the new one, and it doesn't solve the issue. Some say to save the old info and reuse it in the new enc. Still no joy. Anyone else hit this?

SOLVED: My fault... I was supposed to add the content master.key in render RAILS_MASTER_KEY and not the base secret which I was using. As you were folks, nothing to see here.

Purely based on a post on stackoverflow, I changed postgres:11 to postgres:11@sha256:85d79cba2d4942dad7c99f84ec389a5b9cc84fb07a3dcd3aff0fb06948cdc03b and it ran fine after that.

At around 6:30 where you add the /auth/twitter/ link, the method: needs to be added as a :post correct, for OAuth 2.0?

Love these Chris, noting some new tricks along the way. Plus your always positive demeanour makes this so enjoyable to go through.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.