Register

May 2006 27

New installation instructions for Windows

Jim Strupp has written a very detailed and helpful installation guide for installing Tracks on Windows, using Uniform Server. He’s also added instructions for putting Uniform Server and Tracks on a USB memory stick, so that you can take Tracks with you and use it on any computer with Ruby installed. You can download a PDF of his instructions here. Thanks, Jim!

29 Comments

My Windows install (I have never used a database or a webserver before)
1) Download Instant Rails
2) Follow instant rails setup instruction at instant rails site (about ten very easy steps)
http://instantrails.rubyforge.org/tutorial/completing_and_verifying.html
3) Download tracks
4) follow instalation instructions in installation.html (InstantRails uses mysql)
To help with MySQL, you can download MySQLfront, which is free for 30 days
http://www.mysqlfront.de/download.html

reminders:
Place tracks in the rails_apps folder like so:
C:\InstantRails\rails_apps\tracks-1.041\
After starting Instant Rails, stop the Apache server, and when you start tracks, just use WEBrick

I really want to try TRACKS and has follow all the steps.  But I am stuck at step 22. 

When I key in
  rake db:migrate

I get the error msg of
  ‘rake’ is not recognized as an internal or external command, operable program or batch file.

I search the whole c:\ but cannot locate a file name by rake.*.

Any one can help pls.

rake is a ruby make command.  It should be in ruby\bin
So you should make sure that file is there.  Then you may just need to add ruby\bin to your path environmenmt variable.
right-click My Computer, Advanced Tab, Environment Variables

Greg:

rake is not in the ruby/bin directory. It appears to need a separate install, which I can’t get working. As is, there are too many miscues in the pdf and missing parts for this to be installed by non-ruby non-sql knowledgeable users.

Thanks.

The install in the pdf is way too complex.  Try my install which is simpler, (posted in other comment) and also nice because you can first make sure you have rails working before you try to install tracks.  After installing tracks, I decided to stick to my MonkeyGTD since it is just one simple html file and has the same functionality

Managed to over come rake installation.
So here are the steps I took.

= - - = - - = - - = - - = - - = - - = - - =
19a. Download rake from http://rake.rubyforge.org/. Exact url I used is
http://rubyforge.org/frs/download.php/9500/rake-0.7.1.zip

19b. Unzip thr rake-0.7.1.zip to c:\ruby, using the folder name.

19c. Launch a command prompt.  Change the folder to C:\ruby\rake-0.7.1. Type this
    ruby install.rb

Installation should be completed without any error.  Continue with step 20 in the PDF file

= - - = - - = - - = - - = - - = - - = - - =


But I hit into another error in Step 22.
When I run the command, I got this error:

= - - = - - = - - = - - = - - = - - =
== AddUserId: migrating =======================================================
—add_column(“contexts”, “user_id”, :integer, {:default=>1})
  -> 0.0500s
—add_column(“projects”, “user_id”, :integer, {:default=>1})
  -> 0.0700s
—add_column(“todos”, “user_id”, :integer, {:default=>1})
  -> 0.1100s
—execute(“UPDATE ‘contexts’ SET ‘user_id’ = 1;“)
rake aborted!
Mysql::Error: You have an error in your SQL syntax; check the manual that corres
ponds to your MySQL server version for the right syntax to use near ‘'contexts’
SET ‘user_id’ = 1’ at line 1: UPDATE ‘contexts’ SET ‘user_id’ = 1;

(See full trace by running task with—trace)
= - - = - - = - - = - - = - - = - - =

Anyone can help?

PCL: If you’re having trouble, I’d suggest that you try Greg’s instructions for using Instant Rails (unless you particularly wanted to put Tracks on a USB stick). However, I think that your problem with rake might stem from using an old copy of the zipped Tracks bundle. I updated the migrations files to sort this out, as described here. If you have an older copy, I’d try downloading again. You can just replace the files in db/migrations in your old installation rather than starting again from scratch.

going back and following the instructions for the instant rail setup, I got this far in the installation.html

“In a browser (if you haven’t loaded the example data), go to http://0.0.0.0:3000/signup”

Here is the trace from the command window:

D:\InstantRails\rails_apps\tracks104>..\..\ruby\bin\ruby script/server -e production
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with—help for options
[2006-06-05 08:03:57] INFO WEBrick 1.3.1
[2006-06-05 08:03:57] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32]
[2006-06-05 08:03:57] INFO WEBrick::HTTPServer#start: pid=2688 port=3000

however, when I go to the http://0.0.0.0:3000,
I get the following error:

“Firefox can’t establish a connection to the server at 0.0.0.0:3000.“

By the way, in the database.yml file, I changed the database name from “track” to “tracks104”.

I don’t know if that matters. It seemed like the thing to do from the rest of the instructions.

Got to step 29, cant start up tracks with

ruby script/
server –
environment=production

just get:

ruby: No such file or directory,—script/server-environment=production (LoadError)

and thats it. Tried every variation i can find, all files appear to be present and correct, all previous steps all worked fine. Any ideas?

reckoner: If you’ve changed the name of the database in database.yml, make sure that you’ve also changed the name of the database itself, otherwise it won’t find it.

Dave Ashton: Were you inside the Tracks directory when you issued the command? Also, it may just be the formatting, but make sure that the command is as follows:


ruby script/server—environment=production

i.e. with two dashes before environment.

tracks looks awesome, but for a technical layperson like myself, it’s ridiculously complicated to install. i don’t understand why 1) no one has written an installer for it yet; and 2) no one has created a hosted service where anyone can sign up.

1) would be tremendously useful for people like myself.

2) would make a lot of money.

c’mon guys! help us regular people out!!! smile

I am so close, I think!

I followed Greg’s instructions.  Everything went smoothly until his direction #4: follow the instructions in Installation.html.

For those who have never used mysql, it was really difficult.  The commands as written in the installation file do not work.  I finally created a database and gave it the right permissions.

But, I am so lost in the part about
“cd /PATHTO/TRACKS”
I figured it meant change directories to “tracks-1.041”  is that correct?
rake migrate results in an error that says “Mysql::Error: Lost connection to MySQL server during query: SELECT version from shema_info”

Where do I go from here?  This is so much effort just to see tracks in action.  I too would rather just pay for a hosted service!

That was painful, but I finally got it running!  The instructions are conflicting: early on it tells you to name the database tracks104, but later it doesn’t tell you to change the name in the database.yml file.

Anyhow, I’ve got it running, but I hate that the command prompt window stays running.  I’m definitely going to have to try to install it on a rails host, or find someone who is willing to add me as a user on their system for a fee.

Getting rid of the pop-up window:
If you launch your app with Webrick, it is a ruby program that is being launched with ruby.exe.  There is another program rubyw.exe which is exactly the same, but should not open a shell.  So if you go to InstantRails\ruby\bin\ You could rename ruby.exe to old_ruby.exe and then rename rubyw.exe to ruby.exe.

hgupta, I reached the same error message during “rake migrate” as you did. It seems you’ve crossed that hurdle. Any instructions?

Yeah, make sure that the database name that you created in mysql matches the name of the database in the database.yml

Finally got it installed!!!  Was quite a task, but very well worth it in the end.  Used IntantRails for the installation, and any problems I had were my own mistakes and errors (mostly directory structure errors and the like).

I just installed Tracks on a Windows machine.  Everything went smoothly.  Or so I thought.  I launched the server using “ruby script/server—environment=production” and got back the following:
=============================================
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with—help for options
[2006-07-11 15:14:48] INFO WEBrick 1.3.1
[2006-07-11 15:14:48] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2006-07-11 15:14:48] INFO WEBrick::HTTPServer#start: pid=3556 port=3000
===============================================

But when I opened http://0.0.0.0:3000/login in my browser I got a “Firefox can’t establish a connection to the server at 0.0.0.0” message.  Any ideas???

Your help is appreciated.

This is following Greg and thereafter the installation.html with Tracks. Everything went fine until ‘rake migrate’

C:\InstantRails\rails_apps\tracks-1.041>rake migrate
(in C:/InstantRails/rails_apps/tracks-1.041)
rake aborted!
Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM
schema_info

(See full trace by running task with—trace)

I followed the installation.html which told me to do rake db_schma_import.

C:\InstantRails\rails_apps\tracks-1.041>rake db_schema_import
(in C:/InstantRails/rails_apps/tracks-1.041)
—create_table(“contexts”, {:force=>true})
rake aborted!
Mysql::Error: Lost connection to MySQL server during query: CREATE TABLE context
s (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255) DEF
AULT ‘’ NOT NULL, `hide` int(4) DEFAULT 0 NOT NULL, `position` int(11) DEFAULT 0
NOT NULL, `user_id` int(11) DEFAULT 1) ENGINE=InnoDB

(See full trace by running task with—trace)

C:\InstantRails\rails_apps\tracks-1.041>

What do the error messages mean?  I’m a newbie with this mysql stuff.

being a newbie to the mysql stuff myself, I created my database with MySQL Front, which is free for thirty days (you only need to create the database with it once)
http://www.mysqlfront.de/download.html

Khaled and Chris: I’m not sure what the problem is with either of your installations: I don’t have Windows available, so I can’t support problems on that platform very well.

However, Jim Strupp has now made a very easy downloadable installation of Tracks available for Windows users, which uses Uniform Server. Perhaps you could give that a try?

bsag: I’ll definetely give it a shot. I’m really excited to give Tracks a run.

For those wishing to avoid the pains of installation - see http://docs/gtdtracks.com for a hosted service.

In order to get tracks to work with some versions of MySQL (including the InstantRails bundle), you may have to set your database user to root with no password.

If you get the error:
rake aborted!
Mysql::Error: Lost connection to MySQL server during query

try editing database.yml and making it look like:

development:
  adapter: mysql
  database: tracks104
  host: localhost
  username: root
  password:

test:
  adapter: mysql
  database: tracks_test
  host: localhost
  username: root
  password:

production:
  adapter: mysql
  database: tracks104
  host: localhost
  username: root
  password:

You need to log in before you can post a comment. Please use the form at the top of the page to log in, or to register as a user.