2 of 2
2
Questions about application patching
Posted: 14 December 2009 09:44 AM   [ Ignore ]   [ # 16 ]
Newbie
Rank
Total Posts:  13
Joined  2009-11-05

Here is the error log

ActionView::TemplateError (/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection’: gateway_enfora_staging database is not configured) on line #41 of vendor/plugins/fast_admin/app/views/admin/devices/index.html.erb:
38:      <tr class=”<%= cycle(“gray_row”, “”) %>”>
39:        <td>[url=”[removed]void(0);”><% if params[:id] %>?account_id=<%= params[:id] %><% end %>”>edit</a></td>
40:        <td><%= device.name %></td>
41:        <td><%= device_imei_or_link(device) %> </td>
42:        <td><a ]’)”>View[/url]</td>
43:        <td><%= device.gateway_name.nil? ? “” : device.gateway_name.titleize %></td>
44:        <td><% if device.account.nil? %>No Account<% else %><a >”><%= device.account.company %></a><% end %></td>

  app/models/device.rb:103:in `gateway_device’
  vendor/plugins/fast_enfora/app/models/enfora/device.rb:2
  (eval):1:in `gateway_device’
  vendor/plugins/fast_admin/app/controllers/admin/devices_controller.rb:11:in `eval’
  app/models/device.rb:103:in `gateway_device’
  vendor/plugins/fast_admin/app/controllers/admin/devices_controller.rb:11:in `device_imei_or_link’
  (eval):2:in `send’
  (eval):2:in `device_imei_or_link’
  vendor/plugins/fast_admin/app/views/admin/devices/index.html.erb:41
  vendor/plugins/fast_admin/app/views/admin/devices/index.html.erb:33:in `each’
  vendor/plugins/fast_admin/app/views/admin/devices/index.html.erb:33

Processing ApplicationController#index (for 72.233.99.190 at 2009-12-14 15:30:52) [GET]
  Parameters: {“action”=>“index”, “controller”=>“admin/devices”}

TypeError (can’t dump anonymous class Class):
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:110:in `node_export’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:110:in `add’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:110:in `to_yaml’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:109:in `each’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:109:in `to_yaml’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:108:in `seq’
  /usr/lib/ruby/1.8/yaml/rubytypes.rb:108:in `to_yaml’

Profile
 
 
Posted: 14 December 2009 10:56 AM   [ Ignore ]   [ # 17 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

One update that we made in a recent release is to pull the gateway specific information from database.yml instead of having gateway specific config files. This should automatically exist on your staging server, but if you’re trying to run this locally then you’ll need to update your database.yml file with the appropriate entries:

gateway_enfora_development:
  
adaptermysql
  database
enfora_development
  username
root
  password
:

gateway_xirgo_development:
  
adaptermysql
  database
xirgo_development
  username
root
  password
:

gateway_xirgo-wired_development:
  
adaptermysql
  database
xirgo_wired_development
  username
root
  password

Is the error you’re seeing happening locally or on your staging server?

Profile
 
 
Posted: 14 December 2009 01:30 PM   [ Ignore ]   [ # 18 ]
Newbie
Rank
Total Posts:  13
Joined  2009-11-05

The app is on staging. Additional to the staging app,we boot the upgraded app with staging setting separately.
Maybe the setting is incorrect? Below are the setting.

In the upgraded app the setting for the enfora, xirgo and xirgo_wired are in the vendor/plugin/fast_enfora, fast_xirgo and fast_xirgo_wired.

gateway_enfora_staging:
  adapter: mysql
  database: enfora_slicehost
  username:——-
  password:——
  host: localhost
  socket: /var/run/mysqld/mysqld.sock

gateway_xirgo_staging:
  adapter: mysql
  database: xirgo_slicehost
  username:—-
  password:——
  host: localhost
  socket: /var/run/mysqld/mysqld.sock

gateway_xirgo-wired_staging:
  adapter: mysql
  database: xirgo_wired_slicehost
  username:—
  password:——
  host: localhost
  socket: /var/run/mysqld/mysqld.sock

Profile
 
 
Posted: 18 December 2009 12:30 PM   [ Ignore ]   [ # 19 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

From initial glance everything looks okay. Are you still seeing the following error in your staging log file?

establish_connection’gateway_enfora_staging database is not configuredon line #41 of vendor/plugins/fast_admin/app/views/admin/devices/index.html.erb 

Profile
 
 
Posted: 18 December 2009 01:11 PM   [ Ignore ]   [ # 20 ]
Newbie
Rank
Total Posts:  13
Joined  2009-11-05

I figure it out, I was adding the gateway_enfora_staging configuration to the vendor/plugin/fast_enfor/config/database.yml. That don’t work, it works after I adding the db configuration in the /config/database.yml.

Profile
 
 
   
2 of 2
2