Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Issues migrating to 1.9
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dylansm  
View profile  
 More options Oct 26, 3:15 am
From: Dylansm <foliome...@gmail.com>
Date: Sun, 25 Oct 2009 09:15:50 -0700 (PDT)
Local: Mon, Oct 26 2009 3:15 am
Subject: Issues migrating to 1.9
I have both a local dev install of Enki on OS X, and a deployed Enki
blog on Ubuntu 8.04, both running Ruby 1.9.2dev and Rails 2.3.2. I
wanted to identify a couple of issues I've had getting things working,
and ask a question in hopes of getting some help.

Problems I ran into, and how I fixed them:

1. The gem name for latest mislav-will_paginate (2.3.11) is
inconsistent between OS X and Ubuntu, using identical RubyGems
(1.3.5), on OS X it is will_paginate but on Ubuntu it is mislav-
will_paginate. I couldn't figure out a way to reconcile these
differences to I commented out line 13 in config.rb, since the
config.gem name was different on each platform.

2. Problems parsing Enki.yml file. I couldn't access config settings
for values under author, such as email or name, by doing this (from
Config/Initializers/exception_notifier.rb):

  ExceptionNotifier.exception_recipients = [Enki::Config.default
[:author, :email]]

This always produced the following error: ArgumentError: wrong number
of arguments(2 for 1). So I had to change exception_notifier.rb to
this:

  ExceptionNotifier.exception_recipients = [Enki::Config.default
[:author][:email]]

This is, of course, because of the "symbolize_keys" method—in irb it
would be: default["author"]["email"]. Along the same line, I had to
change line 48 in application.html.erb (footer) to access author name
this way: <%=h config[:author][:name] %>

3. On Ubuntu, for some reason, I got the following error when trying
to log into the admin:

  OpenSSL::SSL::SSLError (hostname was not match with the server
certificate)

No idea why I started getting this, but I fixed this by issuing the
following command:

  sudo make-ssl-cert generate-default-snakeoil --force-overwrite

4. Still can't access admin using OpenID. The error I'm getting is:

  NoMethodError (undefined method `author_open_ids' for #<Enki::Config:
0x00000002d92a90>):
  app/controllers/admin/sessions_controller.rb:19:in `block in create'
  app/controllers/admin/sessions_controller.rb:17:in `create'

Any ideas? I would greatly appreciate input on any of this.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dylansm  
View profile  
 More options Oct 26, 10:56 am
From: dylansm <foliome...@gmail.com>
Date: Sun, 25 Oct 2009 16:56:33 -0700 (PDT)
Local: Mon, Oct 26 2009 10:56 am
Subject: Re: Issues migrating to 1.9
UPDATE: I resolved #1 in a better way by uninstalling my local
"will_paginate" gem and reinstalling "mislav-will_paginate".
Apparently, even though the version was correct (2.3.11) that is being
obsoleted. The github mislav-will_paginate wiki has the following:

    The name of the will_paginate gem is now “mislav-will_paginate”
because it’s being built by GitHub. If you have a gem named
“will_paginate”, it is old and you are advised to remove it from your
system.

This fixed another issue I was having in the admin (on local dev)
where paginating content was broken (presumably because I had
commented this out). In case you haven't noticed, I'm still learning
my way around the ruby world.

On Oct 25, 9:15 am, Dylansm <foliome...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xavier Shay  
View profile  
 More options Oct 27, 5:02 pm
From: Xavier Shay <xavier-l...@rhnh.net>
Date: Tue, 27 Oct 2009 17:02:33 +1100
Local: Tues, Oct 27 2009 5:02 pm
Subject: Re: Issues migrating to 1.9
I get two failures running 'rake' against 1.9, do you get the same?
1)
'Admin::HealthController handling POST to exception when logged in
raises a RuntimeError' FAILED
expected Exception but nothing was raised
/Users/xavier/Code/enki/spec/controllers/admin/health_controller_spec.rb:23 :in
`block (4 levels) in <top (required)>'

2)
'Admin::SessionsController#allow_login_bypass? when RAILS_ENV ==
production returns false' FAILED
expected: false,
      got: true (using ==)
/Users/xavier/Code/enki/spec/controllers/admin/sessions_controller_spec.rb: 44:in
`block (3 levels) in <top (required)>'

I will investigate the config failures, see if I can reproduce

On 26/10/09 10:56 AM, dylansm wrote:

> UPDATE: I resolved #1 in a better way by uninstalling my local
> "will_paginate" gem and reinstalling "mislav-will_paginate".
> Apparently, even though the version was correct (2.3.11) that is being
> obsoleted. The github mislav-will_paginate wiki has the following:

>      The name of the will_paginate gem is now “mislav-will_paginate”
> because it’s being built by GitHub. If you have a gem named
> “will_paginate”, it is old and you are advised to remove it from your
> system.

However I think this is now wrong again since github stopped building
gems. I have pushed a commit to use non-github gems.

Also updated to rails 2.3.4


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Collins  
View profile  
 More options Oct 28, 11:35 am
From: Adam Collins <adam.w.coll...@gmail.com>
Date: Tue, 27 Oct 2009 17:35:29 -0700 (PDT)
Local: Wed, Oct 28 2009 11:35 am
Subject: Re: Issues migrating to 1.9
On Oct 26, 11:02 pm, Xavier Shay <xavier-l...@rhnh.net> wrote:

> 2)
> 'Admin::SessionsController#allow_login_bypass? when RAILS_ENV ==
> production returns false' FAILED
> expected: false,
>       got: true (using ==)
> /Users/xavier/Code/enki/spec/controllers/admin/sessions_controller_spec.rb: 44:in
> `block (3 levels) in <top (required)>'

I replaced all RAILS_ENV with ::RAILS_ENV in
sessions_controller_spec.rb to take care of this spec test failure.
Not sure if that's the right solution, but new scoping rule with Ruby
1.9 seem to cause this issue.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xavier Shay  
View profile  
 More options Oct 28, 12:59 pm
From: Xavier Shay <xavier-l...@rhnh.net>
Date: Wed, 28 Oct 2009 12:59:08 +1100
Local: Wed, Oct 28 2009 12:59 pm
Subject: Re: Issues migrating to 1.9

On 28/10/09 11:35 AM, Adam Collins wrote:

> On Oct 26, 11:02 pm, Xavier Shay<xavier-l...@rhnh.net>  wrote:
>> 2)
>> 'Admin::SessionsController#allow_login_bypass? when RAILS_ENV ==
>> production returns false' FAILED
>> expected: false,
>>        got: true (using ==)
>> /Users/xavier/Code/enki/spec/controllers/admin/sessions_controller_spec.rb: 44:in
>> `block (3 levels) in<top (required)>'

> I replaced all RAILS_ENV with ::RAILS_ENV in
> sessions_controller_spec.rb to take care of this spec test failure.
> Not sure if that's the right solution, but new scoping rule with Ruby
> 1.9 seem to cause this issue.

ah spot on, I just committed a different fix which was much worse than
this, so I will amend


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xavier Shay  
View profile  
 More options Oct 28, 1:03 pm
From: Xavier Shay <xavier-l...@rhnh.net>
Date: Wed, 28 Oct 2009 13:03:57 +1100
Local: Wed, Oct 28 2009 1:03 pm
Subject: Re: Issues migrating to 1.9

On 26/10/09 3:15 AM, Dylansm wrote:

$ irb
irb(main):001:0> RUBY_VERSION
=> "1.9.1"
irb(main):002:0> require 'config/environment'
=> true
irb(main):003:0> Enki::Config.default[:author, :email]
=> "d...@enkiblog.com"

^ please run on your environment

> 4. Still can't access admin using OpenID. The error I'm getting is:

>    NoMethodError (undefined method `author_open_ids' for #<Enki::Config:
> 0x00000002d92a90>):
>    app/controllers/admin/sessions_controller.rb:19:in `block in create'
>    app/controllers/admin/sessions_controller.rb:17:in `create'

hmm

$ md5 lib/enki/config.rb
MD5 (lib/enki/config.rb) = 1d75053e36ca36ba1370f1216e624c03

when did you clone enki? You've got a recent HEAD? Please post the top
of your git log.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dylansm  
View profile  
 More options Oct 28, 5:18 pm
From: dylansm <foliome...@gmail.com>
Date: Tue, 27 Oct 2009 23:18:49 -0700 (PDT)
Local: Wed, Oct 28 2009 5:18 pm
Subject: Re: Issues migrating to 1.9

On Oct 27, 7:03 pm, Xavier Shay <xavier-l...@rhnh.net> wrote:

Here's the output for this:

>> RUBY_VERSION
=> "1.9.2"
>> require 'config/environment'

NameError: uninitialized constant Enki::SimpleDelegator
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:440:in `rescue in
load_missing_constant'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:436:in `load_missing_constant'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:80:in `const_missing_with_dependencies'
        from /Users/Shared/Development/_rails_apps/foliomedia_enki/lib/enki/
config.rb:2:in `<module:Enki>'
        from /Users/Shared/Development/_rails_apps/foliomedia_enki/lib/enki/
config.rb:1:in `<top (required)>'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:380:in `load'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:380:in `block in load_file'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:379:in `load_file'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:259:in `require_or_load'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:425:in `load_missing_constant'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:80:in `const_missing_with_dependencies'
        from /Users/Shared/Development/_rails_apps/foliomedia_enki/config/
initializers/exception_notifier.rb:1:in `<top (required)>'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:145:in `load'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:145:in `block in
load_with_new_constant_marking'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:145:in `load_with_new_constant_marking'
        from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/
initializer.rb:600:in `block in load_application_initializers'
        from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/
initializer.rb:599:in `each'
        from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/
initializer.rb:599:in `load_application_initializers'
        from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/
initializer.rb:174:in `process'
        from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/
initializer.rb:113:in `run'
        from /Users/Shared/Development/_rails_apps/foliomedia_enki/config/
environment.rb:9:in `<top (required)>'
        from (irb):2:in `require'
        from (irb):2
        from /usr/local/bin/irb:12:in `<main>'

> > 4. Still can't access admin using OpenID. The error I'm getting is:

> >    NoMethodError (undefined method `author_open_ids' for #<Enki::Config:
> > 0x00000002d92a90>):
> >    app/controllers/admin/sessions_controller.rb:19:in `block in create'
> >    app/controllers/admin/sessions_controller.rb:17:in `create'

> hmm

I can't seem to get the author_open_ids method to be seen. I think
Enki::Config is not initialized or is not what it should be at the
time this is called. I can hard code the openid url, like this
(sessions_controller, line 19):

    if [URI.parse("http://myopenid.blah")].include?(URI.parse
(identity_url))

and it works, at least until I get to the admin/dashboard/show
template where line 8 causes an error (because config is again not
visible or something):

    <h1><%-#= link_to(h(config[:title]), '/') %></h1>

So, commenting it out has been my workaround, for now.

> $ md5 lib/enki/config.rb
> MD5 (lib/enki/config.rb) = 1d75053e36ca36ba1370f1216e624c03

md5 lib/enki/config.rb
MD5 (lib/enki/config.rb) = 34105bea008c05a82fd278894da543cc

> when did you clone enki? You've got a recent HEAD? Please post the top
> of your git log.

I'm sorry, I don't know the exact date when I cloned it. Here's the
top of the git repos log I have (I may be working with source that's
older, but most of the code I've compared looks to be the same):

commit 26ac45833d4ece2f637a9d6d8a99791004b8f1b9
Author: Xavier Shay <xav...@rhnh.net>
Date:   Fri Jul 31 16:38:10 2009 +1000

Thanks for looking into this.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google