diff --git a/Dockerfile b/Dockerfile index e2a57b9..d78d3c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz rm -rf /tmp/node-build-master # Install application gems -COPY Gemfile Gemfile.lock ./ +COPY .ruby-version Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ bundle exec bootsnap precompile --gemfile diff --git a/Gemfile b/Gemfile index f579b24..48d2351 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,8 @@ source "https://rubygems.org" +ruby_version = File.read(File.join(File.dirname(__FILE__), ".ruby-version")).strip +ruby ruby_version + # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 8.0.2", ">= 8.0.2.1" # The modern asset pipeline for Rails [https://github.com/rails/propshaft] diff --git a/Gemfile.lock b/Gemfile.lock index d374f00..3f13819 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -370,5 +370,8 @@ DEPENDENCIES view_component (~> 4.0) web-console +RUBY VERSION + ruby 3.4.5p51 + BUNDLED WITH 2.6.9 diff --git a/app.json b/app.json new file mode 100644 index 0000000..dc99e8f --- /dev/null +++ b/app.json @@ -0,0 +1,10 @@ +{ + "buildpacks": [ + { + "url": "heroku/nodejs" + }, + { + "url": "heroku/ruby" + } + ] +} diff --git a/package.json b/package.json index 9e585dc..d8d711d 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,10 @@ "node": "^20.19.5", "tailwindcss": "^4.1.14" }, + "engines": { + "node": "20.x", + "yarn": "1.x" + }, "scripts": { "build:css": "npx @tailwindcss/cli -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify", "build": "esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets"