Skip to content

Commit 6151fea

Browse files
authored
Application generation fixes (#6728)
* Fix typo in hyrax initializer template * App generation documentation updates
1 parent da11041 commit 6151fea

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

documentation/developing-your-hyrax-based-app.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
A Hyrax-based application includes lots of dependencies. We provide a [Docker image for getting started with your Hyrax-based application](/CONTAINERS.md#docker-image-for-hyrax-based-applications).
2727

28-
<aside><p><em><strong>Note:</em></strong> The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.</p></aside>
28+
**NOTE:** The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.
2929

3030
You can also try [Running Hyrax-based application in local VM](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide#running-hyrax-based-application-in-local-vm) which uses Ubuntu.
3131

@@ -54,7 +54,7 @@ Hyrax requires the following software to work:
5454
1. [LibreOffice](#derivatives)
5555
1. [ffmpeg](#transcoding)
5656

57-
**NOTE: The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.**
57+
**NOTE:** The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.
5858

5959
### Characterization
6060
#### Servlet FITS
@@ -96,7 +96,7 @@ Once ffmpeg has been installed, enable transcoding by setting `config.enable_ffm
9696

9797
## Environments
9898

99-
Note here that the following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
99+
**NOTE:** The following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
100100

101101
## Ruby
102102

@@ -116,18 +116,21 @@ Hyrax requires Rails 6. We recommend the latest Rails 6.1 release.
116116

117117
```
118118
# If you don't already have Rails at your disposal...
119-
gem install rails -v 6.1.7.6
119+
gem install rails -v 6.1.7.7
120120
```
121121

122122
### JavaScript runtime
123123

124124
Rails requires that you have a JavaScript runtime installed (e.g. nodejs or rubyracer). Either install nodejs or uncomment the `rubyracer` line in your Gemfile and run `bundle install` before running Hyrax's install generator.
125125

126-
NOTE: [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
126+
**NOTE:** [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
127127

128128
## Creating a Hyrax-based app
129129

130-
NOTE: The steps need to be done in order to create a new Hyrax based app.
130+
Create a new Hyrax-based application by following these steps in order.
131+
132+
**NOTE:** Starting with Hyrax v5, the generated application will use [Valkyrie](https://github.com/samvera/valkyrie) for repository persistence.
133+
Use of [ActiveFedora](https://github.com/samvera/active_fedora) (instead of Valkyrie) is deprecated, but it should still be possible to reconfigure the generated application to use it.
131134

132135
### Development Prerequisites
133136

@@ -142,8 +145,10 @@ These instructions assume the use of [Lando](https://lando.dev) and [Docker](htt
142145

143146
Generate a new Rails application using the template.
144147

148+
**NOTE:** `HYRAX_SKIP_WINGS` is needed here to avoid loading the Wings compatibility layer during the application generation process.
149+
145150
```shell
146-
rails _6.1.7.6_ new my_app --database=postgresql -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0.rc3/template.rb
151+
HYRAX_SKIP_WINGS=true rails _6.1.7.7_ new my_app --database=postgresql -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0.rc3/template.rb
147152
```
148153

149154
Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -207,7 +212,7 @@ rails s
207212

208213
And now you should be able to browse to [localhost:3000](http://localhost:3000/) and see the application.
209214

210-
Notes:
215+
**NOTE:**
211216
* This web server is purely for development purposes. You will want to use a more fully featured [web server](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#web-server) for production-like environments.
212217
* For a fresh start, the data persisted in Lando can be wiped using `lando destroy`.
213218

lib/generators/hyrax/templates/config/initializers/hyrax.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276

277277
## Enable Valkyrie only mode
278278
config.use_valkyrie = true
279-
config.disable_wings true
279+
config.disable_wings = true
280280

281281
# When your application is ready to use the valkyrie index instead of the one
282282
# maintained by active fedora, you will need to set this to true. You will

0 commit comments

Comments
 (0)