My guess is that there's some weird permission issue between running thin
under /var/www versus your home directory. And you did run script/server
without a sudo (since you mentioned you needed that for the install, etc.)?
As far as the rake spec errors, did you (re-)index after a first run of the
tests? I've updated the README.rdoc and our install guide a couple days ago
to state that you needed to run the tests twice to properly test search.
(The test database needs to be populated first before you'll get results
from the search index.)
Long
On Wed, Aug 20, 2008 at 12:45 AM, Vict0r <[EMAIL PROTECTED]> wrote:
>
> Hi Long (and Jesse!) -
>
> Thanks a lot for replying!
>
> I moved forward a bit, but am still stuck (production log below) -
> still getting the 500 error with thin (but webrick on port 3000 works
> and serves insoshi if i start it with script/server!).
>
> I gave up and installed insoshi from scratch in my /home/username/
> public_html/sitename.com/rails/insoshi
>
> everything went well and i did not have to use sudo.
>
> rake spec gave 10 errors only in relation to the non-existing posts
> and users (missing sample data? - i did all the steps in the install
> instructions... still have those errors)
>
> here is the production.log portion from a single thin request:
>
> Processing HomeController#index (for 72.70.67.161 at 2008-08-20
> 07:35:34) [GET] (pid:4086)
> Session ID:
> BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
> SGFzaHsABjoKQHVzZWR7AA==--9727059e619fb4019605736a0465bf05c8231391
> (pid:4086)
> Parameters: {"action"=>"index", "controller"=>"home"} (pid:4086)
>
>
> NoMethodError (undefined method `person_id=' for #<PageView:
> 0x7f3cabbde9a0>):
> /vendor/rails/activerecord/lib/active_record/attribute_methods.rb:
> 251:in `method_missing'
> /vendor/rails/activerecord/lib/active_record/base.rb:2361:in
> `send'
> /vendor/rails/activerecord/lib/active_record/base.rb:2361:in
> `attributes='
> /vendor/rails/activerecord/lib/active_record/base.rb:2360:in
> `each'
> /vendor/rails/activerecord/lib/active_record/base.rb:2360:in
> `attributes='
> /vendor/rails/activerecord/lib/active_record/base.rb:2130:in
> `initialize'
> /vendor/rails/activerecord/lib/active_record/base.rb:638:in `new'
> /vendor/rails/activerecord/lib/active_record/base.rb:638:in
> `create'
> /app/controllers/application.rb:29:in `create_page_view'
> /vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/callbacks.rb:173:in `send'
> /vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/callbacks.rb:173:in `evaluate_method'
> /vendor/rails/activerecord/lib/../../activesupport/lib/
> active_support/callbacks.rb:161:in `call'
> /vendor/rails/actionpack/lib/action_controller/filters.rb:430:in
> `call'
> /vendor/rails/actionpack/lib/action_controller/filters.rb:592:in
> `run_before_filters'
> /vendor/rails/actionpack/lib/action_controller/filters.rb:578:in
> `call_filters'
> /vendor/rails/actionpack/lib/action_controller/filters.rb:573:in
> `perform_action_without_benchmark'
> /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
> 68:in `perform_action_without_rescue'
> /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
> 68:in `perform_action_without_rescue'
> /vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in
> `perform_action_without_caching'
> /vendor/rails/actionpack/lib/action_controller/caching/
> sql_cache.rb:13:in `perform_action'
> /vendor/rails/activerecord/lib/active_record/connection_adapters/
> abstract/query_cache.rb:33:in `cache'
> /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in
> `cache'
> /vendor/rails/actionpack/lib/action_controller/caching/
> sql_cache.rb:12:in `perform_action'
> /vendor/rails/actionpack/lib/action_controller/base.rb:529:in
> `send'
> /vendor/rails/actionpack/lib/action_controller/base.rb:529:in
> `process_without_filters'
> /vendor/rails/actionpack/lib/action_controller/filters.rb:569:in
> `process_without_session_management_support'
> /vendor/rails/actionpack/lib/action_controller/
> session_management.rb:130:in `process'
> /vendor/rails/actionpack/lib/action_controller/base.rb:389:in
> `process'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 149:in `handle_request'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 107:in `dispatch'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 104:in `synchronize'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 104:in `dispatch'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 120:in `dispatch_cgi'
> /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in
> `dispatch'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/rails.rb:
> 54:in `serve_rails'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/rails.rb:
> 74:in `call'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/connection.rb:
> 59:in `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/connection.rb:
> 50:in `process'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/connection.rb:
> 35:in `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/
> eventmachine.rb:224:in `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.0/lib/
> eventmachine.rb:224:in `run'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/backends/base.rb:
> 45:in `start'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/server.rb:146:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/controllers/
> controller.rb:79:in `start'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:166:in
> `send'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:166:in
> `run_command'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:136:in
> `run!'
> /usr/lib/ruby/gems/1.8/gems/thin-0.8.2/bin/thin:6
> /usr/bin/thin:19:in `load'
> /usr/bin/thin:19
>
> (pid:4086)
> Rendering /home/username/public_html/sitename.com/rails/insoshi/public/
> 500.html <http://sitename.com/rails/insoshi/public/500.html> (500 Internal
> Server Error) (pid:4086)
>
> -----
>
> And here are the rake spec errors:
>
>
> .....FFF.F..FFFF..FF...........................................................................................................
>
> 1)
> 'SearchesController Forum post searches should render with a topic
> link' FAILED
> Expected at least 1 element matching "a[href='/forums/953125641/topics/
> 953125641#post_2028221680']", found 0.
> <false> is not true.
> ./spec/controllers/searches_controller_spec.rb:174:
>
> 2)
> 'SearchesController Forum post searches should render with a post div'
> FAILED
> Expected at least 1 element matching "div[class='forum']", found 0.
> <false> is not true.
> ./spec/controllers/searches_controller_spec.rb:167:
>
> 3)
> 'SearchesController Forum post searches should search by topic name'
> FAILED
> Expected array to include #<ForumPost:0x7f0e9ecbbb38>
> ./spec/controllers/searches_controller_spec.rb:162:
>
> 4)
> 'SearchesController Forum post searches should search by post body'
> FAILED
> Expected array to include #<ForumPost:0x7f0e9e93a108>
> ./spec/controllers/searches_controller_spec.rb:148:
>
> 5)
> 'SearchesController Message searches should search by content' FAILED
> Expected array to include #<Message:0x7f0e9c3f1388>
> ./spec/controllers/searches_controller_spec.rb:123:
>
> 6)
> 'SearchesController Message searches should search by subject' FAILED
> Expected array to include #<Message:0x7f0e9c31c818>
> ./spec/controllers/searches_controller_spec.rb:118:
>
> 7)
> 'SearchesController Person searches as an admin should return email
> unverified users' FAILED
> Expected array to include #<Person:0x7f0e9c0b92b0>
> ./spec/controllers/searches_controller_spec.rb:104:
>
> 8)
> 'SearchesController Person searches as an admin should return
> deactivated users' FAILED
> Expected array to include #<Person:0x7f0e9c0776a8>
> ./spec/controllers/searches_controller_spec.rb:96:
>
> 9)
> 'SearchesController Person searches should search by description'
> FAILED
> expected: [#<Person id: 1402298589, email: "[EMAIL PROTECTED]",
> name: "Quentin", remember_token: nil, crypted_password:
> "EaT4yu95UmbhcAsjUkBLSr1uRLopAOROLpbqdfqeI8jbO4h6uBX...", description:
> "I'm Quentin", remember_token_expires_at: nil, last_contacted_at: nil,
> last_logged_in_at: "2008-08-20 07:39:27", forum_posts_count: 0,
> blog_post_comments_count: 0, wall_comments_count: 0, created_at:
> "2008-08-15 07:39:10", updated_at: "2008-08-20 07:39:27", admin:
> false, deactivated: false, connection_notifications: true,
> message_notifications: true, wall_comment_notifications: true,
> blog_comment_notifications: true, email_verified: true>],
> got: [] (using ==)
> ./spec/controllers/searches_controller_spec.rb:64:
>
> 10)
> 'SearchesController Person searches should search by name' FAILED
> expected: [#<Person id: 1402298589, email: "[EMAIL PROTECTED]",
> name: "Quentin", remember_token: nil, crypted_password:
> "EaT4yu95UmbhcAsjUkBLSr1uRLopAOROLpbqdfqeI8jbO4h6uBX...", description:
> "I'm Quentin", remember_token_expires_at: nil, last_contacted_at: nil,
> last_logged_in_at: "2008-08-20 07:39:27", forum_posts_count: 0,
> blog_post_comments_count: 0, wall_comments_count: 0, created_at:
> "2008-08-15 07:39:10", updated_at: "2008-08-20 07:39:27", admin:
> false, deactivated: false, connection_notifications: true,
> message_notifications: true, wall_comment_notifications: true,
> blog_comment_notifications: true, email_verified: true>],
> got: [] (using ==)
> ./spec/controllers/searches_controller_spec.rb:59:
>
> Finished in 28.579649 seconds
>
> 367 examples, 10 failures
>
> Please let me know what I can do to fix this. This is the second night
> I am staying up to try and make it work and I am not sure I can
> continue to do this much longer...
>
> Any help is appreaciated!
>
> Victor
>
> On Aug 19, 12:42 pm, "Long Nguyen" <[EMAIL PROTECTED]> wrote:
> > Victor,
> >
> > We're configured on slicehost but using apache/mongrel_cluster.
> >
> > The first thing to make sure of is that Insoshi is running fine outside
> your
> > thin config or anything else. Easiest way is to just run
> >
> > script/server -e production
> >
> > in your app install directory and connect to it via the 3000 port.
> >
> > See if you get any information in log/production.log.
> >
> > From what you posted in the comments on the slicehost article, my first
> > guess would be file/directory ownership issues which you hinted at by
> having
> > to do sudo.
> >
> > What userid are you running all this from? And who owns the
> > files/directories?
> >
> > Long
> >
> >
> >
> > On Tue, Aug 19, 2008 at 8:50 AM, Jesse Crockett <[EMAIL PROTECTED]>
> wrote:
> > > There is a really good walkthrough for slicehost deployment of nginx /
> > > mongrel_cluster at urbanpuddle.com -- be careful with the switches, as
> > > there are some user-name configs that may differ should you go with
> > > mongrel. Last, but even better, log onto freenode and join channel
> > > #slicehost (/j #slicehost).. Ryan52, in particular, is very helpful
> and
> > > kind. You may want to say hi from tefflox when you /msg him ;-)
> >
> > > On Tue, Aug 19, 2008 at 10:30 AM, Jesse Crockett <[EMAIL PROTECTED]
> >wrote:
> >
> > >> I suppose I should state that my configuration was Nginx and two
> > >> mongrels... haven't read word one on Thin..
> >
> > >> On Tue, Aug 19, 2008 at 10:28 AM, Jesse Crockett <[EMAIL PROTECTED]
> >wrote:
> >
> > >>> The problems I encountered on slicehost were due to storing them in
> su
> > >>> protected environments such as /var/www. I followed the tutorials by
> > >>> letter, tho I did start from scratch, keeping production directories
> in
> > >>> /home/jess/[site], and it cleared smoothed everything over. If still
> very
> > >>> close to development, I suggest re-installing to your home directory.
> Has
> > >>> the deployment worked in /var/www at all? I can't remember if mine
> ever
> > >>> worked there, but my efforts to chmod started to get tedious, and in
> my
> > >>> experience it's best not to tinker with integral settings. Again, my
> best
> > >>> advise is re-mapping to /home. It may take two or three go-rounds in
> all,
> > >>> so keep all the tutorial tabs open. :-)
> >
> > >>> On Tue, Aug 19, 2008 at 10:06 AM, Vict0r <[EMAIL PROTECTED]
> >wrote:
> >
> > >>>> Hi Jesse -
> >
> > >>>> Thanks for answering -
> >
> > >>>> Slicehost is exactly where I am, and I went through their tutorials
> > >>>> word for word; I am just storing the sites in /var/www/site1.comand /
> > >>>> var/www/site2.com as opposed to doing it in
> /home/username/public_html/
> > >>>> site1.com and /home/username/public_html/site2.com as they are
> > >>>> suggesting.
> >
> > >>>> Everything else I followed to the letter - and now I am getting
> > >>>> Insoshi's 500.html page instead of a home page.
> >
> > >>>> In the beginning Thin would look like it was starting (in response
> to
> > >>>> the start command) and then would quietly exit, without even a
> message
> > >>>> - I documented it here (comments on the very bottom):
> >
> > >>>>
> http://articles.slicehost.com/2008/5/6/ubuntu-hardy-thin-web-server-f...
> >
> > >>>> Now however, when that Insoshi appears to be properly configured (?)
> I
> > >>>> rebooted the VM and 3 Thin processes show up in "ps ax" list and
> their
> > >>>> log files do not show errors - so they do nto exit like before.
> >
> > >>>> I should probably mention that Ruby and Rails are the latest stable
> > >>>> too.
> >
> > >>>> Any Ideas? I just spent the whole night with no sleep on this...
> >
> > >>>> Victor
> >
> > >>>> On Aug 19, 8:44 am, "Jesse Crockett" <[EMAIL PROTECTED]> wrote:
> > >>>> > The slicehost.com tutorials are worth looking into, even if
> you're
> > >>>> not on
> > >>>> > slicehost. Their support and maintenance of these exact sort of
> > >>>> problems is
> > >>>> > bar none, very good indeed. Depthy tutorials for mongrels,
> phusion,
> > >>>> > servers, the works. Also forums for asking questions. Slicehost
> is
> > >>>> > building a rather friendly community. Good place for quick
> answers on
> > >>>> VPS
> > >>>> > deployment.
> >
> > >>>> > On Tue, Aug 19, 2008 at 5:31 AM, Vict0r <[EMAIL PROTECTED]>
> > >>>> wrote:
> >
> > >>>> > > Hi -
> >
> > >>>> > > First of all thank you for your Insoshi development!
> >
> > >>>> > > I am trying to get it Insoshi running on Ubuntu 8.04 / Apache
> 2.2 /
> > >>>> > > Thin 0.82 / MySQL 5.0
> >
> > >>>> > > After going through all the git instructions, installing all the
> > >>>> gems,
> > >>>> > > and doing the rake spec with zero errors, I get the Insoshi's
> 500
> > >>>> > > error instead of the homepage from the insoshi/public/500.html
> when
> > >>>> I
> > >>>> > > go directly to the domain name (with or without www.)
> >
> > >>>> > > Apache is up since other domains hosted there give me
> index.html's
> > >>>> > > from their proper folders.
> >
> > >>>> > > thin config is as follows:
> >
> > >>>> > > cat /etc/thin/DOMAINNAME.yml
> > >>>> > > ---
> > >>>> > > pid: tmp/pids/thin.pid
> > >>>> > > log: log/thin.log
> > >>>> > > timeout: 30
> > >>>> > > port: 5000
> > >>>> > > max_conns: 1024
> > >>>> > > chdir: /var/www/DOMAINNAME.com/rails/insoshi
> > >>>> > > max_persistent_conns: 512
> > >>>> > > environment: production
> > >>>> > > address: 0.0.0.0
> > >>>> > > daemonize: true
> > >>>> > > servers: 3
> >
> > >>>> > > What could be wrong? the site as you can see is in /var/www/
> > >>>> > > DOMAINNAME.com.com/rails/insoshi
> >
> > >>>> > > Was I supposed to change permissions to something via CHMOD? I
> know
> > >>>> > > that when I ran rake and all the other commands, I had to do
> SUDO in
> > >>>> > > front of each command in order for pretty much every one of your
> > >>>> > > install steps to work properly.
> >
> > >>>> > > Please let me know (or let me know if you need more information)
> ! I
> > >>>> > > am a fan of yours ever since your railspace teaching video...
> >
> > >>>> > > Victor- Hide quoted text -
> >
> > >>>> > - Show quoted text -
> >
> > --
> > Long Nguyen
> > [EMAIL PROTECTED]
> >
>
--
Long Nguyen
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---