That's probably the result of not setting a Preference object, which
stores things like the app name and other site-wide preferences.
Running

$ script/install

(instead of just migrating) should fix the problem.

Michael

On Wed, Aug 27, 2008 at 1:13 PM, HeresTomWithTheWeather
<[EMAIL PROTECTED]> wrote:
>
> i'm also getting the error when load up my production site into my
> browser:
>
> ActionView::TemplateError (undefined method `app_name' for
> nil:NilClass) on line #13 of home/index.html.erb:
>
> investigating...
>
> On Aug 27, 2:53 am, Vict0r <[EMAIL PROTECTED]> wrote:
>> Hi everyone -
>>
>> First of all - thank you Long -
>>
>> ./configure --enable-id64
>>
>> worked and
>>
>> rake spec
>>
>> now produces no errors at all for RAILS_ENV=test when ultrasphinx is
>> loaded....
>>
>> I dropped all MySQL databases and started install instructions from
>> scratch. This lead up to the point when WEBrick server starts with no
>> errors in development mode, and serves the site on port 3000; starting/
>> restarting thin (even rebooting the vm) immediately after this *in
>> production mode* produces insoshi's error 500.
>>
>> So I tried configuring thin to run in development mode, and it works!
>> Just to check, I tried running webrick in production mode and it also
>> gives error 500.
>>
>> So what I am missing are precise steps to fix the production
>> environment now. I have tried doing:
>>
>> rake db:migrate RAILS_ENV=production
>>
>> and it completes with no errors (I did not load sample data into
>> production via: rake db:sample_data:reload RAILS_ENV=production )
>>
>> After doing this I still got insoshi's error 500 in production mode
>> from thin. This is the top part of the exact error that thin gives in
>> production mode from production.log:
>>
>> ** ultrasphinx: spelling support not available (raspell configuration
>> raised "uninitialized constant Ultrasphinx::Spell::Aspell")
>>
>> Processing HomeController#index (for 72.70.67.161 at 2008-08-27
>> 06:31:55) [GET] (pid:3944)
>>   Session ID:
>> BAh7CDoOcmV0dXJuX3RvMDoMY3NyZl9pZCIlMjBmNTM3NmQ1MDZjOTI1YTMz
>> YzRmYzM0NWU5YmQwOTQiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZs
>> YXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA=--569c614bbeda8f820ca0652eb155511763e28b7f
>> (pid:3944)
>>   Parameters: {"action"=>"index", "controller"=>"home"} (pid:3944)
>> Rendering template within layouts/application (pid:3944)
>> Rendering home/index (pid:3944)
>>
>> ActionView::TemplateError (undefined method `app_name' for
>> nil:NilClass) on line #13 of home/index.html.erb:
>> 10:     <%= render :partial => 'shared/contacts_preview',
>> 11:                :locals => { :person => current_person } %>
>> 12:   <%- else -%>
>> 13:     <%- unlessglobal_prefs.app_name.blank? -%>
>> 14:       <h2>About <%=global_prefs.app_name %></h2>
>> 15:
>> 16:       <p>
>>
>>     app/views/home/index.html.erb:13:in
>> `_run_erb_47app47views47home47index46html46erb'
>> -----etc----
>>
>> I would love to see how to get insoshi to run in production mode....
>>
>> Thanks again!
>>
>> Victor
>>
>> On Aug 22, 9:26 pm, "Long Nguyen" <[EMAIL PROTECTED]> wrote:
>>
>> > Okay, I think I've got a handle on what's going on....
>>
>> > For the failing search specs, you're running into an issue Evan Dorn had.
>> > The IDs for the fixtures and whatever sphinx is doing to as part of the
>> > indexing is running past the 32-bit integer limit.  You need to recompile
>> > sphinx with the "--enable-id64" option:
>>
>> > $ ./configure --enable-id64
>> > $ make clean
>> > $ make all
>> > $ sudo make install
>>
>> > The indicator that this might be the issue is that it's saying that it has
>> > specific items it knows it should find, but isn't.  This is as opposed to
>> > just not having anything in the index.
>>
>> > Long
>>
>> > On Fri, Aug 22, 2008 at 3:57 PM, Vict0r <[EMAIL PROTECTED]> wrote:
>>
>> > > Hi Long & Insoshi contributors/users -
>>
>> > > I logged into mysql and dropped all insoshi databases to "start
>> > > fresh".
>> > > I then proceeded according to your README.rdoc (
>> > >http://github.com/insoshi/insoshi/tree/master) from the script/
>> > > install:
>>
>> > > script/install
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > [sudo] password for dreamer:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > rake aborted!
>> > > Unknown database 'insoshi_development'
>>
>> > > (See full trace by running task with --trace)
>>
>> > > At this point I did:
>>
>> > > rake db:create:all
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>>
>> > > Then I repeated script/install:
>>
>> > > script/install
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>> > > == 1 CreatePeople: migrating
>>
>> > > etc with all 28 successful migrations.
>>
>> > > Now I moved on to your next instruction:
>>
>> > > rake db:test:prepare
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>>
>> > > Finally, did rake spec
>>
>> > > rake spec
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>>
>> > > ...........................................................................................................................................................................................................................................................................................................................................................
>>
>> > > Finished in 32.372136 seconds
>>
>> > > 347 examples, 0 failures
>>
>> > > So - seems like everything looks good (except for the rake
>> > > db:create:all which I had to add to you instructions)
>>
>> > > Now on to the search:
>>
>> > > I went through
>> > >  $ rake ultrasphinx:configure RAILS_ENV=test
>> > >  $ rake ultrasphinx:index RAILS_ENV=test
>> > >  $ rake ultrasphinx:daemon:start RAILS_ENV=test
>>
>> > > with no errors.
>>
>> > > Time for another rake spec:
>>
>> > > rake spec
>> > > RESULT:
>> > > (in /home/username/public_html/sitename.com/rails/insoshi)
>>
>> > > .....................................................................................................................................................................................................................................................FFFFFFFFF.F..FF...........................................................................................................
>>
>> > > 1)
>> > > ActiveRecord::RecordNotFound in 'SearchesController Forum post
>> > > searches should render with a topic link'
>> > > Couldn't find ForumPosts with IDs: 392249925,954479856 (found 0
>> > > results, but was looking for 2)
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:308:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`reify_results'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`each'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`reify_results'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search.rb:362:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`run'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:352:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>
>> > > `perform_action_with_retries'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search.rb:342:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`run'
>> > > /home/username/public_html/sitename.com/rails/insoshi/app/controllers/
>> > > searches_controller.rb:34:in `index'
>> > > ./spec/controllers/searches_controller_spec.rb:172:
>>
>> > > 2)
>> > > ActiveRecord::RecordNotFound in 'SearchesController Forum post
>> > > searches should render with a post div'
>> > > Couldn't find ForumPost with ID=954479856
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:308:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`reify_results'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`each'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`reify_results'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search.rb:362:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`run'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:352:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>
>> > > `perform_action_with_retries'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search.rb:342:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`run'
>> > > /home/username/public_html/sitename.com/rails/insoshi/app/controllers/
>> > > searches_controller.rb:34:in `index'
>> > > ./spec/controllers/searches_controller_spec.rb:166:
>>
>> > > 3)
>> > > ActiveRecord::RecordNotFound in 'SearchesController Forum post
>> > > searches should search by topic name'
>> > > Couldn't find ForumPosts with IDs: 392249925,954479856 (found 0
>> > > results, but was looking for 2)
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:308:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`reify_results'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>> > > ultrasphinx/lib/ultrasphinx/search/internals.rb:286:in<http://sitename.com/rails/insoshi/vendor/plugins/ultrasphinx/lib/ultr...>`each'
>> > > /home/username/public_html/sitename.com/rails/insoshi/vendor/plugins/
>>
>> ...
>>
>> read more ยป
> >
>



-- 
Michael Hartl
Insoshi social software
http://insoshi.com/

--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/

You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to