diff --git a/bitnami/rails/Dockerfile b/bitnami/rails/Dockerfile index c05a3d8b2fb3..bf471231ad6a 100644 --- a/bitnami/rails/Dockerfile +++ b/bitnami/rails/Dockerfile @@ -30,14 +30,15 @@ RUN bitnami-pkg install imagemagick-6.7.5-10-3 --checksum 617e85a42c80f58c568f9b RUN bitnami-pkg install mysql-libraries-10.1.13-0 --checksum 71ca428b619901123493503f8a99ccfa588e5afddd26e0d503a32cca1bc2a389 # Ruby on Rails template -RUN gem install rails -v 4.2.6 --no-document +RUN gem install rails -v 5.0.0.1 --no-document # Bundle the gems required for a new application RUN rails new /tmp/temp_app --database mysql --quiet && rm -r /tmp/temp_app +RUN gem install therubyracer ENV RAILS_ENV=development ENV BITNAMI_APP_NAME=rails -ENV BITNAMI_IMAGE_VERSION=4.2.6-r4 +ENV BITNAMI_IMAGE_VERSION=5.0.0.1-r0 USER bitnami WORKDIR /app diff --git a/bitnami/rails/docker-compose.yml b/bitnami/rails/docker-compose.yml index bc2e335cc361..1ead7fa20a5d 100644 --- a/bitnami/rails/docker-compose.yml +++ b/bitnami/rails/docker-compose.yml @@ -6,7 +6,7 @@ services: myapp: tty: true # Enables debugging capabilities when attached to this container. - image: bitnami/rails:4.2.6-r3 + image: bitnami/rails:5.0.0.1-r0 environment: - DATABASE_URL=mysql2://mariadb/my_app_development depends_on: diff --git a/bitnami/rails/rootfs/app-entrypoint.sh b/bitnami/rails/rootfs/app-entrypoint.sh index ea46fc238b58..2becdfe4e654 100755 --- a/bitnami/rails/rootfs/app-entrypoint.sh +++ b/bitnami/rails/rootfs/app-entrypoint.sh @@ -32,12 +32,12 @@ wait_for_db() { setup_db() { log "Configuring the database" - bundle exec rake db:create + bundle exec rails db:create } migrate_db() { log "Applying database migrations (db:migrate)" - bundle exec rake db:migrate + bundle exec rails db:migrate } log () { @@ -48,6 +48,8 @@ if [ "$1" == "bundle" -a "$2" == "exec" ]; then if ! app_present; then log "Creating rails application" rails new . --skip-bundle --database mysql + # Add rubyracer + sed -i "s/# gem 'therubyracer'/gem 'therubyracer'/" Gemfile fi if ! gems_up_to_date; then @@ -64,7 +66,7 @@ if [ "$1" == "bundle" -a "$2" == "exec" ]; then echo " App initialization skipped:" echo " Delete the file $INIT_SEM and restart the container to reinitialize" echo " You can alternatively run specific commands using docker-compose exec" - echo " e.g docker-compose exec rails bundle exec rake db:migrate" + echo " e.g docker-compose exec rails bundle exec rails db:migrate" echo " " echo "#########################################################################" else