Talk:Installation

From mx Help Wiki
Revision as of 15:49, 14 February 2008 by Kweskm (Talk | contribs)

Jump to: navigation, search

Under: "Add a root taxon name to your table," I created the root record in the taxon_name table successfully:

insert into taxon_names (name, l, r, creator_id, updator_id) values ('root', 1, 2, 1, 1);

However, no taxa show up in the web interface of the database so I can't add new real taxa because there is no existing parent for the new taxa to be children off.

Contents

set "editable taxon names" in /admin

The level at which a user can edit the taxonomic name heirarchy (not OTUs!) can be set on the admin tab. Assign the 'root' taxon to admin, enter a couple of names, and then assign those children to your various users.


still not sure

I found the "editable taxon names" in the /admin page. When I click on the admin's name I can choose 'root' from the drop down list below "Add a name". After submitting that with the Add button, I get this:

Error creating thumbnail: Unable to save thumbnail to destination

I'm not sure what to do from there. No taxa show up in the "Taxon names" tab when logged in as the admin to a test project.

Kweskm 15:41, 13 February 2008 (CST)

Aha. You should be seeing "root" there, but since you added the name from the database the TaxonName.display_name hasn't been generated. To generate the name for the first time click 'Renumber (reindex) all taxon names (also rebuilds display_name)' on the administrator interface. Then check back and see if you see "root" there (untested, but likely the case. --matt 20:10, 13 February 2008 (CST)


A resolution

I think I figured it out. The step I was missing was going to the Visiblity page of the "Taxon names" tab. There I can enter root in the species name picker to make it visible to this project and then I can add children taxa. The lack of 'root' next to the checkbox is because the mysql record creation:

insert into taxon_names (name, l, r, creator_id, updator_id) values ('root', 1, 2, 1, 1);

doesn't include data for the display_name field. I'm going to update the install wiki to be:

insert into taxon_names (name, display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);

and I'm going to add something about the visibility option.

Another question re image uploads

I'm getting an error when I try to upload images or link to Morphbank images. First the odd thing. I'm only having this problem on one of the computers where I've tried installing mx, so I thing it's an install problem rather than an mx script error. The error is:

ActiveRecord::StatementInvalid in ImageController#create Mysql::Error: #23000Column 'file_name' cannot be null: INSERT INTO images (`created_on`, `file_type`, `taken_on_month`, `creator_id`, `file_name`, `updated_on`, `file_size`, `user_file_name`, `file_md5`, `notes`, `taken_on_year`, `technique`, `height`, `proj_id`, `ref_id`, `owner`, `mb_id`, `taken_on_day`, `updator_id`, `width`) VALUES('2008-02-13 16:49:21', 'png', NULL, 1, NULL, '2008-02-13 16:49:21', 289765, 'Picture2.png', '4390684438f0da000f2050d87241d9a5', , NULL, , 900, 1, NULL, , NULL, NULL, 1, 1440)

RAILS_ROOT: ./script/../config/..

and then more lines listed under Trace and Request.

I've compared the good and bad computers and they both have the same rail version (1.2.6) and gems. I've tried different browsers and webservers (WEBrick and Mongrel). I tried uploading under gel image and I got the same error. There were some differences in the installation of ruby in the two computers and one is a Mac OS 10.4 G4 and the other is 10.4 intel. I've tried different image formats and files. Imagemagick convert and identify work from my path, but the error doesn't seem be related to that.

- Hard to say what's going on there. Are the right permissions set? Check them for ImageMagik on both machines. There are definitely some differences b/w Mac and PC setups for loading images, but we've never worked with 10.4 intel. You might have to use the debugger and check things out. In the image.rb model there are a number of methods that get called that load the image, one of them grabs information. For example edit and add 'breakpoint' at the bottom of 'def record_image_details'. Try loading an image, the breakpoint will get hit and the browser will pause, do 'ruby script/breakpointer' from the installation root, and you'll run the breakpoint shell. You can then do things like type the name of the variable in the code to see what its storing. Typing 'exit' will exit the breakpoint and the page will finish loading. --matt 20:23, 13 February 2008 (CST)

The other weird image related things is that when I go to add a image link from morph bank. I enter the morphbank numer and OTU (via the ajax dropdown) and I always get a little error message saying "Failed to add Morphbank image, did you include an OTU?" This also works on the other install I tried. Any thoughts about where to go for debugging this problem?

Kweskm 15:58, 13 February 2008 (CST)

You're likely not using the blue dropdowns correctly. You must always choose the name from the dropdown, not just type it in. Choose it by clicking the name, or tabbing out when you have the name you want selected. I highly recommend installing the webdev toolbar for firefox in this regard. From there do Forms->show form details, you'll see the hidden field that gets set when you select from the ajax dropdown. If a number appears you know its getting set correctly, if the problem persists we'll have to further debug it. --matt 20:23, 13 February 2008 (CST)

Personal tools