Build #10340 - Xirgo Wired Database Issue
Posted: 20 December 2009 09:18 PM   [ Ignore ]
Newbie
Rank
Total Posts:  14
Joined  2009-12-20

Hi,

I applied the patch for Build #10340 (http://dev.numerex.com/blog/article/new-fast-core-tracking-build-10340/) in order to get support for NM-5500 (wired Xirgo) devices in admin.

Upon doing so, it still says “This functionality is not currently enabled on your FAST server. Please contact your Numerex associate to learn more.”

I put some debug code in to see why it was still saying this and the problem seems to be that it can’t find the database for those devices.  The error is:

Mysql::Error in Xirgo wiredController#index

Unknown database ‘xirgo_wired_slicehost’

I see the diff adds this database in the fast_wired_xirgo plugin’s database.yml file.  I was expecting migrations but didn’t find any.  What am I missing and how can I fix this?

Thanks in advance.

Profile
 
 
Posted: 21 December 2009 12:26 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  13
Joined  2009-11-05

Which environment you are running? local or staging?
If you are running your app locally you need to add the xirgo_wired_development ( I assume you are running development mode locally) database config in the config/database.yml
and make sure you do create the xirgo_wired_development db in your local database.
For example:
gateway_xirgo-wired_development:
  adapter: mysql
  database: xirgo_wired_development
  username: your_user_name
  password: your_pass_word

Suggest you have 3 major sections in your database.yml
development section, testing section, staging section

Hope this will help.

Profile
 
 
Posted: 21 December 2009 12:29 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  14
Joined  2009-12-20

Thanks for the reply.

I’m running on the staging server, not locally.

I’ve copied the necessary database.yml lines from the plugin’s database.yml to the main app’s database.yml.

I could create the database myself but even after doing so I would need to know/create the structure of it (tables, fields, etc.).  I am expecting there is a migration somewhere for this - or how is the database initialized?

Profile
 
 
Posted: 21 December 2009 12:45 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  13
Joined  2009-11-05

Do you need to test with the data? I can’t connect to staging now, can’t confirm are there data in the xirgo_wired_slicehost. The database was there when I pick up the project, I am not sure how this database been populated. If you just need to test the function, not the data, you might only need the db(as long as db is exist). If you need to test with data, you might need to contact Numerex to dump the xirgo_wired_slicehost db for you.

I am not able to connect to staging now…is my network issue or the staging server issue? Can you connect to staging server?
There is no connection timeout…just hanging there….....weird

Profile
 
 
Posted: 21 December 2009 12:51 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  14
Joined  2009-12-20

I need to add the devices, so the database structure has to be created (tables, fields, etc.)  Either the gateway should create the necessary structure upon first use, or there should be a migration.  I couldn’t find a trace of either so I’m puzzled.

I am able to connect to the staging server fine right now with no troubles.

Profile
 
 
Posted: 21 December 2009 01:17 PM   [ Ignore ]   [ # 5 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

Do you already have 3 wire devices, but no gateway support? If so, then something was overlooked on our end and we apologize for any inconvenience. The gateway schema is normally generated on our end by our gateway deployment script. Let me know and I can steer you in the right direction.

Profile
 
 
Posted: 21 December 2009 01:29 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  14
Joined  2009-12-20

dbaldwin,

Thanks for the reply.  I’m not exactly sure what you mean (I’m just a developer, not a user of this system) but in the admin I have some NM-OBD devices setup and working.  I’m trying to add NM-5500 devices but getting the error I mentioned.

Is the gateway deployment script something I have access to and should’ve run?  I ran through some of the deploy scripts and didn’t see any tasks for setting up the database I needed.  I did not deploy using capistrano when I applied the patch; I assumed the patch would provide everything needed and just did a rake db:migrate.  This is what led me on the hunt for migrations after seeing no changes.

Please let me know what information you need to guide me in this process.

Thanks so much.

Profile
 
 
Posted: 21 December 2009 04:35 PM   [ Ignore ]   [ # 7 ]
Member
RankRankRank
Total Posts:  66
Joined  2009-10-24

Yes, we had a few wired units… as well as OBD units.  We have been unable to view the wired units that should have been there.

I am speaking in conjunction with tparkin as we are working on the same account

Profile
 
 
Posted: 22 December 2009 11:16 AM   [ Ignore ]   [ # 8 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

Guys, this is something we should have taken care of when we deployed your server. You’ve done everything right on your end. Let me coordinate this with our gateway team so we can get the database installed.

Profile