-
Notifications
You must be signed in to change notification settings - Fork 1
Common Tasks
Mark Bussey edited this page Apr 22, 2018
·
16 revisions
-
Start the VM if it's not running
- Open a new terminal window
- Change directory to the directory with your Vagrantfile in it
- Type
vagrant up
-
Connect to the VM
- Type
vagrant ssh
from the directory with your Vagrantfile in it
- Type
-
Editing files
- This tutorial assumes that you run the examples within your virtual machine from the
/vagrant/ohsu2018
directory - The entire
/vagrant
directory in your virtual machine (guest) is shared to your laptop (host), so you can use your favorite editor or IDE to edit files easily atpath-you-copied-to-on-your-host-system/vagrant/ohsu2018
- Inside the guest machine, you can also use linux editors like
vim
andnano
to edit files.
- This tutorial assumes that you run the examples within your virtual machine from the
-
Start a rails console
- Make sure you're connected to the VM
- Type
cd /vagrant/ohsu2018
to change directory to the root of your rails application - Type
rails console
to enter the console (orrails c
for shorthand) - Type
exit
when you're done to return to the command line
-
Start solr, fedora, and web servers
- You'll generally want to open a separate terminal and connect to a new ssh session where you can leave the servers running
- Type
cd /vagrant/ohsu2018
to change directory to the root of your rails application - Type
rails hydra:server
to start Solr, Fedora, and the Web server
-
Start Solr if you get an error like "ERROR: Core 'hydra-test' already exists!"
- Clear the test solr instance using
rm -rf tmp/solr-development/server/solr/hydra-test
- Try
bundle exec rake ci
again and things should work; if not, ask for help.
- Clear the test solr instance using