diff --git a/Vagrantfile b/Vagrantfile index bd16569af..fc3ca62c7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -28,7 +28,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.synced_folder '.', '/vagrant', type: 'virtualbox' # Provisioning - config.vm.provision "shell", privileged: true, run: "always" do |s| + config.vm.provision "shell", privileged: true, run: "once" do |s| s.inline = "export LC_ALL=en_US.UTF-8\n" \ "export LANG=en_US.UTF-8\n" \ "export LANGUAGE=en_US.UTF-8" diff --git a/config/environments/development.rb b/config/environments/development.rb index ba7f34da0..79305c1b6 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -4,7 +4,7 @@ Rails.application.configure do # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = true + config.cache_classes = false # Do not eager load code on boot. config.eager_load = false @@ -25,7 +25,8 @@ Rails.application.configure do # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. - config.assets.debug = false + # Set to false when running with Vagrant to speed up response time. + config.assets.debug = ENV['VIRTUAL_DEV_ENV'] ? false : true # Asset digests allow you to set far-future HTTP expiration dates on all assets, # yet still be able to expire them through the digest params. diff --git a/provision/box_setup.zsh b/provision/box_setup.zsh index e72571a8e..b0a05d5da 100755 --- a/provision/box_setup.zsh +++ b/provision/box_setup.zsh @@ -1,5 +1,19 @@ #!/usr/bin/env zsh +# Set environmen values ####################################################### + + # Virtual environment flag + echo '# Set virtual environment flag' >> ~/.profile + echo 'export VIRTUAL_DEV_ENV=true' >> ~/.profile + echo "\n" >> ~/.profile + + # Language configuration + echo '# Set locale configuration' >> ~/.profile + echo 'export LC_ALL=en_US.UTF-8' >> ~/.profile + echo 'export LANG=en_US.UTF-8' >> ~/.profile + echo 'export LANGUAGE=en_US.UTF-8' >> ~/.profile + echo "\n" >> ~/.profile + # Install and setup PostgreSQL ################################################ echo "***************************************************" @@ -93,14 +107,6 @@ echo "***************************************************" echo "Checking for NVM... " echo "***************************************************" if [[ ! -x "$HOME/.nvm" ]]; then - - # Set language configuration - echo '# Set locale configuration' >> ~/.profile - echo 'export LC_ALL=en_US.UTF-8' >> ~/.profile - echo 'export LANG=en_US.UTF-8' >> ~/.profile - echo 'export LANGUAGE=en_US.UTF-8' >> ~/.profile - echo "\n" >> ~/.profile - wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash echo '# Node Version Manager' >> ~/.profile