-
Notifications
You must be signed in to change notification settings - Fork 23
Setting up the demo app
E. Lynette Rayle edited this page Oct 22, 2020
·
7 revisions
- Set up a new Rails application with PostGres as the database.
- Install Valkyrie.
- Set up
.gitignore
(recommended if committing your demo app to GitHub).
To set up a new Rails app with Postgres, open a terminal and run the following command:
rails new valkyrie_pg_demo --database=postgresql
Enter the directory for your demo app:
cd valkyrie_pg_demo
Edit Gemfile
at the root of the app and after # gem 'mini_racer', platforms: :ruby
, add the following line:
gem 'valkyrie'
To install the gem, run the following command in the terminal:
bundle install
Alternatively, run this command adding the bundled gems to the vendor/bundle
directory in the app:
bundle install --path=vendor/bundle
This alternative technique will install your gems as a set of dependencies isolated specifically to this demo.
If you plan to commit the demo to version control, and you have installed your gems through vendor/bundle
, you can add a .gitignore
file and add the following lines, so all of your gems do not get added to version control:
# Ignore vendor/cache and bundle
/vendor/cache
/vendor/bundle