mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
* Toggle check works for non root paths (#215 - thanks eric!)
* Toggling or deleting items on todo/list now results in the proper visual behaviour when the page has not been refreshed after adding the action that you are acting on. i.e. previously, if you added an item, then tried to check it as done without refreshing the page, it would not disappear from the context box until you refreshed the page. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@197 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
7a97de9c52
commit
8fb563fcbb
5 changed files with 54 additions and 88 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<div id="item-<%= item.id %>">
|
||||
<%= link_to_remote_todo( item, controller.controller_name ) %>
|
||||
<input type="checkbox" class="item-checkbox"
|
||||
onclick="new Ajax.Request('/<%= controller.controller_name %>/toggle_check/<%= item.id %>', {asynchronous:true, evalScripts:true});"
|
||||
onclick="new Ajax.Request('<%= url_for :controller => controller.controller_name, :action => 'toggle_check', :id => item.id %>', {asynchronous:true, evalScripts:true});"
|
||||
name="item_id" value="<%= item.id %>"<% if item.done? %> checked="checked" <% end %> />
|
||||
<div class="description<%= staleness_class( item ) %>"><% # start of div which has a class 'description', and possibly 'stale_11', 'stale_12', 'stale_13' etc %>
|
||||
<% if item.done? -%>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
if @saved
|
||||
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
|
||||
page.remove "item-#{@item.id}-container"
|
||||
# For some reason, the code below works on the project and context pages, but
|
||||
# not on the todo/list page when the item being deleted has just been added
|
||||
# page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
|
||||
page.replace_html "badge_count", @down_count
|
||||
else
|
||||
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
if @saved
|
||||
page.call "fadeAndRemoveItem", "item-#{@item.id}-container"
|
||||
page.remove "item-#{@item.id}-container"
|
||||
# For some reason, the code below works on the project and context pages, but
|
||||
# not on the todo/list page when the item being deleted has just been added
|
||||
# page.call "fadeAndRemoveItem", "item-#{@item.id}-container"
|
||||
if @item.done?
|
||||
page.insert_html :top, "completed", :partial => 'todo/item'
|
||||
page.visual_effect :highlight, "item-#{@item.id}", {'startcolor' => "'#99ff99'"}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* Copyright: (cc) 2004-2006 rousette.org.uk
|
||||
* License: GNU GPL
|
||||
|
||||
While fully usable for everyday use, Tracks is still a work in progress. Make sure that you take sensible precautions and back up all your data frequently. Full changenotes can be found in `tracks/doc/CHANGENOTES.txt`. Full API documentation can be found at `tracks/doc/app/index.html`, once you have run `rake appdoc`
|
||||
While fully usable for everyday use, Tracks is still a work in progress. Make sure that you take sensible precautions and back up all your data frequently. Full changenotes can be found in `doc/CHANGENOTES.txt`. Full API documentation can be found at `doc/app/index.html`, once you have run `rake appdoc`
|
||||
|
||||
**IF THIS CRASHES YOUR MACHINE AND LOSES YOUR DATA, IT'S NOT MY FAULT!**
|
||||
|
||||
|
|
@ -31,29 +31,23 @@ See the [wiki](http://dev.rousette.org.uk/wiki/Tracks/Install) for more details
|
|||
|
||||
In the following, I'm assuming that you're using MySQL and the built-in WEBrick server. See the sections below for additional instructions on using other databases and servers.
|
||||
|
||||
* Unzip `tracks_1_04.zip` somewhere in your home folder ( e.g. `/Users/yourusername/Sites`).
|
||||
* Make a database for which you have full access rights. e.g. assuming that you want to call your database `tracks-104`, at the command line:
|
||||
* Unzip `tracks_1.04.zip` somewhere in your home folder ( e.g. `/Users/yourusername/Sites`).
|
||||
* Make a database for which you have full access rights. e.g. assuming that you want to call your database `tracks104`, at the command line:
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
mysql -uroot -p
|
||||
mysql> CREATE DATABASE tracks-104;
|
||||
mysql> GRANT ALL PRIVILEGES ON tracks-104.* TO yourmysqluser@localhost \
|
||||
mysql> CREATE DATABASE tracks104;
|
||||
mysql> GRANT ALL PRIVILEGES ON tracks104.* TO yourmysqluser@localhost \
|
||||
IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION;
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
* Copy the file `config/database.yml.tmpl` to `config/database.yml`.
|
||||
* Copy the file `config/database.yml.tmpl` to `config/database.yml`, and `log.tmpl` to `log`.
|
||||
* Open the `tracks/config/database.yml` file, and enter your username and password details for the database you just set up under the 'production' and 'development' sections. **NB**: If you do set up the entry for 'test', make sure that you specify a different database, or when you run tests, they will overwrite your data. It's very important that you don't use TABS in any of the `*.yml` files. Just use spaces to indent.
|
||||
* Run `rake setup_tracks`, which will copy all the files and directories with `*.tmpl` extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
* Open the file `config/environment.rb` and look at the last line which should read: `SALT = "change-me"`. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.
|
||||
* Run 'rake migrate', which will create the necessary tables in your database, including some required contents:
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
|
|
@ -63,15 +57,16 @@ In the following, I'm assuming that you're using MySQL and the built-in WEBrick
|
|||
|
||||
* If you find that 'rake migrate' doesn't work for you (there have been reports of it not working well with the MySQL distributed with InstantRails on Windows), you can use the command `rake db_schema_import` which will do the same thing.
|
||||
* (Optional step) If you want to import some example next actions, projects and contexts, use the command `rake load_fixtures`. This will import data into your database, including two users: an admin user with the login 'admin' and password 'abracadabra', and a normal user 'jane' with password 'sesame'.
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
`ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*`
|
||||
* Run the following command at your command line (**Important:** If you already have an application running on WEBrick (Tracks or anything else), make sure that you stop the server, or run Tracks on a different port using the `--port` option):
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like `#c:/ruby/bin/ruby`.
|
||||
* Run the following command at your command line (**Important:** If you already have an application running on WEBrick (Tracks or anything else), make sure that you stop the server (Ctrl-C in the terminal running the server), or run Tracks on a different port using the `--port` option):
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
ruby script/server -e production
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
* In a browser (if you haven't loaded the example data), go to `http://0.0.0.0:3000/signup`. This will allow you to choose a username and password for the admin user. Thereafter, anyone else trying to access `/signup` will get a message that they are not allowed to sign up, and are given your email address to contact for permission. When you are logged in as the admin user, you can visit `/signup` to sign up additional users (who will not be able to view any of your next actions, contexts, projects or notes, but can set up their own separate tasks), and visit `/login` to login yourself.
|
||||
* Add some contexts at `http://0.0.0.0:3000/contexts` (you must do this before adding any next actions) and projects at `http://0.0.0.0:3000/projects` and then you're ready to add all your next actions.
|
||||
* You can set various preferences by visiting `http://0.0.0.0:3000/user/preferences`. These are stored on a per-user basis in the database.
|
||||
|
|
@ -82,7 +77,7 @@ In the following, I'm assuming that you're using MySQL and the built-in WEBrick
|
|||
The instructions are the same as those for MySQL above, except that I have provided an SQLite3 database, pre-loaded with the correct schema (`db/tracks-104.db`). All you need to do is to insert that filename in database.yml. e.g.:
|
||||
|
||||
adapter: sqlite3
|
||||
database: /Users/YOURUSERNAME/Sites/tracks/db/tracks-104.db
|
||||
database: /PATH/TO/TRACKS/db/tracks-104.db
|
||||
|
||||
### Upgrading from Tracks 1.03
|
||||
|
||||
|
|
@ -90,40 +85,30 @@ The instructions are the same as those for MySQL above, except that I have provi
|
|||
|
||||
* For safety, rename your current Tracks directory to 'tracks-old' or something similar.
|
||||
* Before you do anything else, **BACK UP YOUR DATABASE** (tables and content) and keep the SQL dumps somewhere safe so that you can recreate the old database if necesary.
|
||||
* Run `rake setup_tracks`, which will copy all the files and directories with `*.tmpl` extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:
|
||||
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
|
||||
* Copy the file `config/database.yml.tmpl` to `config/database.yml`, and copy `log.tmpl` to `log`
|
||||
* Open the file `config/environment.rb` and look at the last line which should read: `SALT = "change-me"`. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.
|
||||
* In `database.yml` insert your old database name, user and password under the 'development' section.
|
||||
* Run the command `rake extract_fixtures` inside the Tracks directory. This will populate the `db/exported_fixtures` directory with `*.yml` files corresponding to the contexts, projects and todos table from the contents of your old database.
|
||||
* Open `db/exported_fixtures/todos.yml` and search for the lines starting `created:` and replace with `created_at:`.
|
||||
* Create a new MySQL database (named tracks-104, for example).
|
||||
* In `database.yml` insert this new database name, user and password under the 'development' section.
|
||||
* Create a new MySQL database (named tracks104, for example).
|
||||
* In `database.yml` insert this new database name, user and password under the 'development' and 'production' sections.
|
||||
* Run the command `rake db_schema_import` inside the Tracks directory. This should import the upgraded schema for 1.04 into your new database.
|
||||
* Run the command `rake load_exported_fixtures` which will import the contents of your old database from the fixtures files in `db/exported_fixtures`.
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
`ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*`
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like `#c:/ruby/bin/ruby`.
|
||||
* From here, follow the remaining steps for new users above to start the server. Since your users table was deliberately not imported, you'll have to re-create your users via `/signup`. Signup is now at `http://0.0.0.0:3000/signup`, and login at `http://0.0.0.0:3000/login`.
|
||||
|
||||
#### SQLite or SQLite3
|
||||
|
||||
* For safety, rename your current Tracks directory to 'tracks-old' or something similar (making sure that you keep your old database safe), create a new directory for the new version.
|
||||
* Copy (NOT MOVE!) your old database into the new tracks/db directory.
|
||||
* Run `rake setup_tracks`, which will copy all the files and directories with `*.tmpl` extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:
|
||||
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
|
||||
* Copy the file `config/database.yml.tmpl` to `config/database.yml`, and copy `log.tmpl` to `log`
|
||||
* Open the file `config/environment.rb` and look at the last line which should read: `SALT = "change-me"`. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.
|
||||
* In `database.yml` insert your old database name, user and password under the 'development' section.
|
||||
* Run the command `rake extract_fixtures` inside the Tracks directory. This will populate the `db/exported_fixtures` directory with `*.yml` files corresponding to the contexts, projects and todos table from the contents of your old database.
|
||||
* Open `db/exported_fixtures/todos.yml` and search for the lines starting `created:` and replace with `created_at:`, and `done: "0"` with `done: "f"` and `done: "1"` with `done: "t"`. You need to replace the similar 'done' lines in `projects.yml`, and in `contexts.yml` replace `hide: "0"` with `hide: "f"` and `hide: "1"` with `hide: "t"`.
|
||||
* In `database.yml` insert the name of the provided `tracks-104.db` the 'development' section.
|
||||
* Run the command `rake load_exported_fixtures` which will import the contents of your old database from the fixtures files in `db/exported_fixtures`.
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
`ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*`
|
||||
* Check the shebang lines 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 *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like `#c:/ruby/bin/ruby`.
|
||||
* From here, follow the remaining steps for new users above to start the server. Since your users table was deliberately not imported, you'll have to re-create your users via `/signup`. Signup is now at `http://0.0.0.0:3000/signup`, and login at `http://0.0.0.0:3000/login`.
|
||||
|
||||
## Other servers
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<h1 id="tracks_a_gtd_web_application_built_with_ruby_on_rails">Tracks: a GTD web application, built with Ruby on Rails</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.rousette.org.uk/projects/">Homepage</a></li>
|
||||
<li><a href="http://dev.rousette.org.uk/report/6">Trac (for bug reports)</a></li>
|
||||
<li><a href ="http://dev.rousette.org.uk/wiki">Wiki</a> (more info on installation)</li>
|
||||
<li>Author: <a href="http://www.rousette.org.uk/">bsag</a></li>
|
||||
<li>Homepage: http://www.rousette.org.uk/projects/</li>
|
||||
<li>Trac (for bug reports): http://dev.rousette.org.uk/report/6</li>
|
||||
<li>Wiki (more info on installation): http://dev.rousette.org.uk/wiki</li>
|
||||
<li>Author: bsag (http://www.rousette.org.uk/)</li>
|
||||
<li>Contributors: Nicholas Lee, Lolindrath, Jim Ray, Arnaud Limbourg, Timothy Martens, Luke Melia, John Leonard (for great installation tutorials on Windows XP)</li>
|
||||
<li>Version: 1.04</li>
|
||||
<li>Copyright: (cc) 2004-2006 rousette.org.uk</li>
|
||||
<li>License: GNU GPL</li>
|
||||
</ul>
|
||||
|
||||
<p>While fully usable for everyday use, Tracks is still a work in progress. Make sure that you take sensible precautions and back up all your data frequently. Full changenotes can be found in <code>tracks/doc/CHANGENOTES.txt</code>. Full API documentation can be found at <code>tracks/doc/app/index.html</code>, once you have run <code>rake appdoc</code></p>
|
||||
<p>While fully usable for everyday use, Tracks is still a work in progress. Make sure that you take sensible precautions and back up all your data frequently. Full changenotes can be found in <code>doc/CHANGENOTES.txt</code>. Full API documentation can be found at <code>doc/app/index.html</code>, once you have run <code>rake appdoc</code></p>
|
||||
|
||||
<p><strong>IF THIS CRASHES YOUR MACHINE AND LOSES YOUR DATA, IT'S NOT MY FAULT!</strong></p>
|
||||
|
||||
|
|
@ -36,30 +36,25 @@
|
|||
<p>In the following, I'm assuming that you're using MySQL and the built-in WEBrick server. See the sections below for additional instructions on using other databases and servers.</p>
|
||||
|
||||
<ul>
|
||||
<li>Unzip <code>tracks_1_04.zip</code> somewhere in your home folder ( e.g. <code>/Users/yourusername/Sites</code>).</li>
|
||||
<li>Make a database for which you have full access rights. e.g. assuming that you want to call your database <code>tracks-104</code>, at the command line:</li>
|
||||
<li>Unzip <code>tracks_1.04.zip</code> somewhere in your home folder ( e.g. <code>/Users/yourusername/Sites</code>).</li>
|
||||
<li>Make a database for which you have full access rights. e.g. assuming that you want to call your database <code>tracks104</code>, at the command line:</li>
|
||||
</ul>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
mysql -uroot -p
|
||||
mysql> CREATE DATABASE tracks-104;
|
||||
mysql> GRANT ALL PRIVILEGES ON tracks-104.* TO yourmysqluser@localhost \
|
||||
mysql> CREATE DATABASE tracks104;
|
||||
mysql> GRANT ALL PRIVILEGES ON tracks104.* TO yourmysqluser@localhost \
|
||||
IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION;
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<li>Copy the file <code>config/database.yml.tmpl</code> to <code>config/database.yml</code>.</li>
|
||||
<ul>
|
||||
<li>Copy the file <code>config/database.yml.tmpl</code> to <code>config/database.yml</code>, and <code>log.tmpl</code> to <code>log</code>.</li>
|
||||
<li>Open the <code>tracks/config/database.yml</code> file, and enter your username and password details for the database you just set up under the 'production' and 'development' sections. <strong>NB</strong>: If you do set up the entry for 'test', make sure that you specify a different database, or when you run tests, they will overwrite your data. It's very important that you don't use TABS in any of the <code>*.yml</code> files. Just use spaces to indent.</li>
|
||||
<li>Run <code>rake setup_tracks</code>, which will copy all the files and directories with <code>*.tmpl</code> extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:</li>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
</code>
|
||||
</pre>
|
||||
<li>Open the file <code>config/environment.rb</code> and look at the last line which should read: <code>SALT = "change-me"</code>. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.</li>
|
||||
<li>Run 'rake migrate', which will create the necessary tables in your database, including some required contents:</li>
|
||||
</ul>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
|
|
@ -68,11 +63,12 @@
|
|||
</code>
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li>If you find that 'rake migrate' doesn't work for you (there have been reports of it not working well with the MySQL distributed with InstantRails on Windows), you can use the command <code>rake db_schema_import</code> which will do the same thing.</li>
|
||||
<li>(Optional step) If you want to import some example next actions, projects and contexts, use the command <code>rake load_fixtures</code>. This will import data into your database, including two users: an admin user with the login 'admin' and password 'abracadabra', and a normal user 'jane' with password 'sesame'.</li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
<code>ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*</code></li>
|
||||
<li>Run the following command at your command line (<strong>Important:</strong> If you already have an application running on WEBrick (Tracks or anything else), make sure that you stop the server, or run Tracks on a different port using the <code>--port</code> option):</li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like <code>#c:/ruby/bin/ruby</code>.</li>
|
||||
<li>Run the following command at your command line (<strong>Important:</strong> If you already have an application running on WEBrick (Tracks or anything else), make sure that you stop the server (Ctrl-C in the terminal running the server), or run Tracks on a different port using the <code>--port</code> option):</li>
|
||||
</ul>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
|
|
@ -81,6 +77,7 @@
|
|||
</code>
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li>In a browser (if you haven't loaded the example data), go to <code>http://0.0.0.0:3000/signup</code>. This will allow you to choose a username and password for the admin user. Thereafter, anyone else trying to access <code>/signup</code> will get a message that they are not allowed to sign up, and are given your email address to contact for permission. When you are logged in as the admin user, you can visit <code>/signup</code> to sign up additional users (who will not be able to view any of your next actions, contexts, projects or notes, but can set up their own separate tasks), and visit <code>/login</code> to login yourself.</li>
|
||||
<li>Add some contexts at <code>http://0.0.0.0:3000/contexts</code> (you must do this before adding any next actions) and projects at <code>http://0.0.0.0:3000/projects</code> and then you're ready to add all your next actions.</li>
|
||||
<li>You can set various preferences by visiting <code>http://0.0.0.0:3000/user/preferences</code>. These are stored on a per-user basis in the database.</li>
|
||||
|
|
@ -92,7 +89,7 @@
|
|||
<p>The instructions are the same as those for MySQL above, except that I have provided an SQLite3 database, pre-loaded with the correct schema (<code>db/tracks-104.db</code>). All you need to do is to insert that filename in database.yml. e.g.:</p>
|
||||
|
||||
<pre><code>adapter: sqlite3
|
||||
database: /Users/YOURUSERNAME/Sites/tracks/db/tracks-104.db
|
||||
database: /PATH/TO/TRACKS/db/tracks-104.db
|
||||
</code></pre>
|
||||
|
||||
<h3 id="upgrading_from_tracks_103">Upgrading from Tracks 1.03</h3>
|
||||
|
|
@ -102,23 +99,16 @@ database: /Users/YOURUSERNAME/Sites/tracks/db/tracks-104.db
|
|||
<ul>
|
||||
<li>For safety, rename your current Tracks directory to 'tracks-old' or something similar.</li>
|
||||
<li>Before you do anything else, <strong>BACK UP YOUR DATABASE</strong> (tables and content) and keep the SQL dumps somewhere safe so that you can recreate the old database if necesary.</li>
|
||||
<li>Run <code>rake setup_tracks</code>, which will copy all the files and directories with <code>*.tmpl</code> extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:</li>
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
</code>
|
||||
</pre>
|
||||
<li>Copy the file <code>config/database.yml.tmpl</code> to <code>config/database.yml</code>, and copy <code>log.tmpl</code> to <code>log</code></li>
|
||||
<li>Open the file <code>config/environment.rb</code> and look at the last line which should read: <code>SALT = "change-me"</code>. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.</li>
|
||||
<li>In <code>database.yml</code> insert your old database name, user and password under the 'development' section.</li>
|
||||
<li>Run the command <code>rake extract_fixtures</code> inside the Tracks directory. This will populate the <code>db/exported_fixtures</code> directory with <code>*.yml</code> files corresponding to the contexts, projects and todos table from the contents of your old database.</li>
|
||||
<li>Open <code>db/exported_fixtures/todos.yml</code> and search for the lines starting <code>created:</code> and replace with <code>created_at:</code>.</li>
|
||||
<li>Create a new MySQL database (named tracks-104, for example).</li>
|
||||
<li>In <code>database.yml</code> insert this new database name, user and password under the 'development' section.</li>
|
||||
<li>Create a new MySQL database (named tracks104, for example).</li>
|
||||
<li>In <code>database.yml</code> insert this new database name, user and password under the 'development' and 'production' sections.</li>
|
||||
<li>Run the command <code>rake db_schema_import</code> inside the Tracks directory. This should import the upgraded schema for 1.04 into your new database.</li>
|
||||
<li>Run the command <code>rake load_exported_fixtures</code> which will import the contents of your old database from the fixtures files in <code>db/exported_fixtures</code>.</li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
<code>ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*</code></li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like <code>#c:/ruby/bin/ruby</code>.</li>
|
||||
<li>From here, follow the remaining steps for new users above to start the server. Since your users table was deliberately not imported, you'll have to re-create your users via <code>/signup</code>. Signup is now at <code>http://0.0.0.0:3000/signup</code>, and login at <code>http://0.0.0.0:3000/login</code>.</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -127,22 +117,14 @@ database: /Users/YOURUSERNAME/Sites/tracks/db/tracks-104.db
|
|||
<ul>
|
||||
<li>For safety, rename your current Tracks directory to 'tracks-old' or something similar (making sure that you keep your old database safe), create a new directory for the new version.</li>
|
||||
<li>Copy (NOT MOVE!) your old database into the new tracks/db directory.</li>
|
||||
<li>Run <code>rake setup_tracks</code>, which will copy all the files and directories with <code>*.tmpl</code> extensions and removes the extension. It ignores any files or directories that you've already converted, so it's safe to run it when you're upgrading:</li>
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
cd /PATHTO/TRACKS
|
||||
rake setup_tracks
|
||||
</code>
|
||||
</pre>
|
||||
<li>Copy the file <code>config/database.yml.tmpl</code> to <code>config/database.yml</code>, and copy <code>log.tmpl</code> to <code>log</code></li>
|
||||
<li>Open the file <code>config/environment.rb</code> and look at the last line which should read: <code>SALT = "change-me"</code>. Change the word change-me to something else of your choosing. This string will be used as a 'salt' to encrypt your password and make it a bit more secure.</li>
|
||||
<li>In <code>database.yml</code> insert your old database name, user and password under the 'development' section.</li>
|
||||
<li>Run the command <code>rake extract_fixtures</code> inside the Tracks directory. This will populate the <code>db/exported_fixtures</code> directory with <code>*.yml</code> files corresponding to the contexts, projects and todos table from the contents of your old database.</li>
|
||||
<li>Open <code>db/exported_fixtures/todos.yml</code> and search for the lines starting <code>created:</code> and replace with <code>created_at:</code>, and <code>done: "0"</code> with <code>done: "f"</code> and <code>done: "1"</code> with <code>done: "t"</code>. You need to replace the similar 'done' lines in <code>projects.yml</code>, and in <code>contexts.yml</code> replace <code>hide: "0"</code> with <code>hide: "f"</code> and <code>hide: "1"</code> with <code>hide: "t"</code>.</li>
|
||||
<li>In <code>database.yml</code> insert the name of the provided <code>tracks-104.db</code> the 'development' section.</li>
|
||||
<li>Run the command <code>rake load_exported_fixtures</code> which will import the contents of your old database from the fixtures files in <code>db/exported_fixtures</code>.</li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it. Try this command at the command line, run inside the Tracks directory:
|
||||
<code>ruby -i.bak -pe 'gsub!("#!/usr/bin/env ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*</code></li>
|
||||
<li>Check the shebang lines of the <code>public/dispatch.*</code> files and all the files in the script directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like <code>#c:/ruby/bin/ruby</code>.</li>
|
||||
<li>From here, follow the remaining steps for new users above to start the server. Since your users table was deliberately not imported, you'll have to re-create your users via <code>/signup</code>. Signup is now at <code>http://0.0.0.0:3000/signup</code>, and login at <code>http://0.0.0.0:3000/login</code>.</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -156,14 +138,7 @@ database: /Users/YOURUSERNAME/Sites/tracks/db/tracks-104.db
|
|||
|
||||
<h3 id="lighttpd">Lighttpd</h3>
|
||||
|
||||
<p>Again, see <code>tracks/README_RAILS</code> for a working example of a lighttpd.conf file. Note that you'll want to change the line: </p>
|
||||
<pre>
|
||||
<code>"bin-environment" => ( "RAILS_ENV" => "development"</code>
|
||||
</pre>
|
||||
to:
|
||||
<pre>
|
||||
<code>"bin-environment" => ( "RAILS_ENV" => "production"</code>.
|
||||
</pre>
|
||||
<p>Again, see <code>tracks/README_RAILS</code> for a working example of a lighttpd.conf file. Note that you'll want to change the line: <code>`"bin-environment" => ( "RAILS_ENV" => "development"</code> to <code>"bin-environment" => ( "RAILS_ENV" => "production"</code>.</p>
|
||||
|
||||
<h2 id="contacting_me">Contacting me</h2>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue