mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Add a configuration setting for serving static assets
This new setting will allow us to control in `site.yml` whether or not our static assets will be served by Rails or by the app server that is proxying requests to Rails. This is set to `false` by default so that the proxying server is responsible for serving the assets.
This commit is contained in:
parent
48c1d7c214
commit
faf585b1d4
5 changed files with 9 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
|||
* Thin replaces WEBrick as the included web server
|
||||
* Tracks is tested on Ruby 1.9.3, 2.0.0, 2.1, and 2.2.
|
||||
* The MessageGateway will save the received email as an attachement to the todo
|
||||
* Add a configuration option for serving static assets from Rails
|
||||
|
||||
## Version 2.3.0
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ Tracks is built upon a number of Ruby libraries (known as ‘gems’). The Bundl
|
|||
2. Open the file `config/database.yml` and edit the `production:` section with the details of your database. If you are using MySQL the `adapter:` line should read `adapter: mysql2`, `host: localhost` (in the majority of cases), and your username and password should match those you assigned when you created the database. If you are using SQLite3, you should have only two lines under the production section: `adapter: sqlite3` and `database: db/tracks.db`.
|
||||
3. Open the file `config/site.yml`, and read through the settings to make sure that they suit your setup. In most cases, all you need to change are the `secret_token`, the administrator email address (`admin_email`), and the time zone setting. For the time zone setting you can use the command `bundle exec rake time:zones:local` to see all available timezones on your machine
|
||||
4. If you are using Windows, you may need to check the ‘shebang’ lines (`#!/usr/bin/env ruby`) of the `/public/dispatch.*` files and all the files in the `/script` directory. They are set to `#!/usr/bin/env ruby` by default. This should work for all Unix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like `#c:/ruby/bin/ruby` to point to the Ruby binary on your system.
|
||||
5. If you intend to deploy Tracks using its included web server, you’ll need to change `config.serve_static_assets` to `true` in `config/environments/production.rb` in order for the images, stylesheets, and javascript files to be served correctly.
|
||||
5. If you intend to deploy Tracks using its included web server, you’ll need to uncomment and change the `serve_static_assets` configuration option to `true` in `config/site.yml` in order for the images, stylesheets, and javascript files to be served correctly.
|
||||
|
||||
## Populate your database with the Tracks schema
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ That said. To upgrade:
|
|||
7. Precompile your static assets (css, javascript, etc.) by running `bundle exec rake assets:precompile RAILS_ENV=production`.
|
||||
8. Run `bundle exec rails server -e production` inside your Tracks 2.4devel directory to start up Tracks. Or use `-e development` if you intend to try your changes and get more log info.
|
||||
|
||||
Please note that if you intend to deploy Tracks using its included web server, you’ll need to change `config.serve_static_assets` to `true` in `config/environments/production.rb` in order for the images, stylesheets, and javascript files to be served correctly.
|
||||
Please note that if you intend to deploy Tracks using its included web server, you’ll need to copy over the `serve_static_assets` option into your `config/site.yml` and set it as it was in `config/production.rb` in order for the images, stylesheets, and javascript files to be served correctly.
|
||||
|
||||
## Upgrading from older versions of Tracks
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue