Skip to content

Commit

Permalink
🧹 Attempting fix of bin/rails
Browse files Browse the repository at this point in the history
In the docker container, I'm unable to run `rails c`; I get an error
regarding the hyrax application.

This is an attempt to see if we can tidy that up.
  • Loading branch information
jeremyf committed Dec 19, 2023
1 parent a9dc46e commit b6b6864
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ RUN ln -sf /usr/lib/libmediainfo.so.0 /app/fits/tools/mediainfo/linux/libmediain
ln -sf /usr/lib/libzen.so.0 /app/fits/tools/mediainfo/linux/libzen.so.0

COPY --chown=1001:101 ./bin/db-migrate-seed.sh /app/samvera/
COPY --chown=1001:101 ./bin/rails /app/samvera/

ONBUILD ARG APP_PATH=.
ONBUILD COPY --chown=1001:101 $APP_PATH/Gemfile* /app/samvera/hyrax-webapp/
Expand Down
22 changes: 19 additions & 3 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'

APP_PATH = File.expand_path("./hyrax-webapp/config/application", __dir__)

# Set up gems listed in the Gemfile.
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("./hyrax-webapp/Gemfile", __dir__)
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])

require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "action_cable/engine"
# require "rails/test_unit/railtie"
require "rails/engine/commands"

0 comments on commit b6b6864

Please sign in to comment.