Magnus Holm | 2 May 23:54 2009
Picon

Re: camping-test error: undefined method `fixtures'

Oh, didn't know anyone was actually using this :-)

It's because Rails no longer include the fixture-model into  
Test::Unit::TestCase, but rather into a subclass. I'll see if I can  
fix it...

//Magnus

Den 2. mai. 2009 kl. 22.04 skrev Mikkel Refsgaard Bech
<mikkel@... 
 >:

> Hi
>
> Trying to use camping-test with my camping app but I get an error:
> undefined method `fixtures'
>
> The error can be reproduced by using this empty app (your_app.rb):
>
> require 'camping'
> Camping.goes :YourApp
> module Steps
>  module Models
>  end
>  module Controllers
>  end
>  module Views
>  end
> end
>
(Continue reading)

Magnus Holm | 3 May 21:34 2009
Picon

Re: camping-test error: undefined method `fixtures'

I've pushed out a fix now. Could you verify it?

//Magnus Holm


On Sat, May 2, 2009 at 22:04, Mikkel Refsgaard Bech <mikkel-a9GCc21zDDe6j0qgbfArMg@public.gmane.org> wrote:
Hi

Trying to use camping-test with my camping app but I get an error:
undefined method `fixtures'

The error can be reproduced by using this empty app (your_app.rb):

require 'camping'
Camping.goes :YourApp
module Steps
 module Models
 end
 module Controllers
 end
 module Views
 end
end

And running the test from camping-test:
http://github.com/judofyr/camping-test/tree/master

I just run:
# ruby test_your_app.rb
test_your_app.rb:7: undefined method `fixtures' for YourApp::Tests::TestSomeBasicStuff:Class (NoMethodError)

camping-1.9.300
activesupport-2.3.2
activerecord-2.3.2
camping-test

Is anyone using this successfully?

Regards,
Mikkel

_______________________________________________
Camping-list mailing list
Camping-list <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Mikkel Refsgaard Bech | 5 May 22:40 2009
Picon

Re: camping-test error: undefined method `fixtures'

On 03/05/2009, at 21.34, Magnus Holm wrote:

> I've pushed out a fix now. Could you verify it?

Works fine, thank you.

Any reason for not using the :memory: database any longer?

Regards,
Mikkel
Magnus Holm | 5 May 22:49 2009
Picon

Re: camping-test error: undefined method `fixtures'

Oh crap. Did that get commited? I was just testing if the memory-database had anything to do with it and forgot to change it back later. Pushing a "fix" tomorrow :-)

//Magnus Holm


On Tue, May 5, 2009 at 22:40, Mikkel Refsgaard Bech <mikkel-a9GCc21zDDe6j0qgbfArMg@public.gmane.org> wrote:
On 03/05/2009, at 21.34, Magnus Holm wrote:

I've pushed out a fix now. Could you verify it?

Works fine, thank you.

Any reason for not using the :memory: database any longer?


Regards,
Mikkel

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
in-seok hwang | 6 May 11:34 2009
Picon

i want div's controller in layout fucntion

hi! all!

my camping version is . 1.5.180
mongrel is 1.1.5

Finally, my web site is almost complete.
thank you! camper!!!!!

but, i has one little problem.

i know that how connect 'some page' and 'some controller'.

 In this case, how i can connect 'div ' and 'some controller'

Sample code has a few modifications.

     require 'camping'
     
      Camping.goes :Blog

      module Blog::Models
        class Post < Base; belongs_to :user; end
        class Comment < Base; belongs_to :user; end
        class User < Base; end
      end

      module Blog::Controllers
        class Index < R '/'
          def get
            <at> posts = Post.find :all
            render :index
          end
        end
        class News               #point 2
          def get
            p 'this is News get'
            render :news
          end
        end
      end

      module Blog::Views
        def layout
          html do
            body do
              div :id => 'news' do        # point 1
                 self << news
              end
             
              div :id => 'content' do
                 self << yield
              end
            end
          end
        end

        def index
          for post in <at> posts
            h1 post.title
          end
        end

        def news               #point 3
          ul do
                     li 'test1'
                     li 'test2'
                     li 'test3'
                     li 'test4'
           end
         end

      end

this code is can't connect News controller.( not print 'this is News get' )

i want  connect point1 and point2 .... like a Index controller
and change ul list(point3)

Do not worry about if my article has typing miss




_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Magnus Holm | 6 May 21:50 2009
Picon

Re: i want div's controller in layout fucntion

Let me see if I understand your problem correctly:

On every page you want to include news, which should go through the News-controller?



//Magnus Holm


On Wed, May 6, 2009 at 11:34, in-seok hwang <his2000x <at> gmail.com> wrote:
hi! all!

my camping version is . 1.5.180
mongrel is 1.1.5

Finally, my web site is almost complete.
thank you! camper!!!!!

but, i has one little problem.

i know that how connect 'some page' and 'some controller'.

 In this case, how i can connect 'div ' and 'some controller'

Sample code has a few modifications.

     require 'camping'
     
      Camping.goes :Blog

      module Blog::Models
        class Post < Base; belongs_to :user; end
        class Comment < Base; belongs_to :user; end
        class User < Base; end
      end

      module Blog::Controllers
        class Index < R '/'
          def get
            <at> posts = Post.find :all
            render :index
          end
        end
        class News               #point 2
          def get
            p 'this is News get'
            render :news
          end
        end
      end

      module Blog::Views
        def layout
          html do
            body do
              div :id => 'news' do        # point 1
                 self << news
              end
             
              div :id => 'content' do
                 self << yield
              end
            end
          end
        end

        def index
          for post in <at> posts
            h1 post.title
          end
        end

        def news               #point 3
          ul do
                     li 'test1'
                     li 'test2'
                     li 'test3'
                     li 'test4'
           end
         end

      end

this code is can't connect News controller.( not print 'this is News get' )

i want  connect point1 and point2 .... like a Index controller
and change ul list(point3)

Do not worry about if my article has typing miss





_______________________________________________
Camping-list mailing list
Camping-list <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Mikkel Refsgaard Bech | 6 May 22:28 2009
Picon

Re: camping-test error: undefined method `fixtures'


On 05/05/2009, at 22.49, Magnus Holm wrote:

Oh crap. Did that get commited? I was just testing if the memory-database had anything to do with it and forgot to change it back later. Pushing a "fix" tomorrow :-)

Sweet. 

One other thing, I can't figure out how to input some <at> state before I call get/post/etc... I need to test my app while I'm logged in, which just means that some user ID is set in <at> state, is that possible?

E.g.:

test "i can get my secret page when I am logged id" do
   <at> state.user_id = 1
  get '/secretpage'
  assert_response :ok
end

Thanks,
Mikkel



//Magnus Holm


On Tue, May 5, 2009 at 22:40, Mikkel Refsgaard Bech <mikkel-a9GCc21zDDe6j0qgbfArMg@public.gmane.org> wrote:
On 03/05/2009, at 21.34, Magnus Holm wrote:

I've pushed out a fix now. Could you verify it?

Works fine, thank you.

Any reason for not using the :memory: database any longer?


Regards,
Mikkel

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
in-seok hwang | 6 May 22:53 2009
Picon

Re: i want div's controller in layout fucntion

thank you! Magnus Holm!!!!

the problem has been resolved.

finally , i can sleep :)

have a nice day~

2009/5/7 Magnus Holm <judofyr <at> gmail.com>:
> Let me see if I understand your problem correctly:
> On every page you want to include news, which should go through the
> News-controller?
> Here's one way to do
> it: http://pastie.textmate.org/private/0a47n2wegu7xdaovoudu2q
>
> //Magnus Holm
>
>
> On Wed, May 6, 2009 at 11:34, in-seok hwang <his2000x <at> gmail.com> wrote:
>>
>> hi! all!
>>
>> my camping version is . 1.5.180
>> mongrel is 1.1.5
>>
>> Finally, my web site is almost complete.
>> thank you! camper!!!!!
>>
>> but, i has one little problem.
>>
>> i know that how connect 'some page' and 'some controller'.
>>
>>  In this case, how i can connect 'div ' and 'some controller'
>>
>> Sample code has a few modifications.
>>
>>>      require 'camping'
>>>
>>>       Camping.goes :Blog
>>>
>>>       module Blog::Models
>>>         class Post < Base; belongs_to :user; end
>>>         class Comment < Base; belongs_to :user; end
>>>         class User < Base; end
>>>       end
>>>
>>>       module Blog::Controllers
>>>         class Index < R '/'
>>>           def get
>>>              <at> posts = Post.find :all
>>>             render :index
>>>           end
>>>         end
>>>         class News               #point 2
>>>           def get
>>>             p 'this is News get'
>>>             render :news
>>>           end
>>>         end
>>>       end
>>>
>>>       module Blog::Views
>>>         def layout
>>>           html do
>>>             body do
>>>               div :id => 'news' do        # point 1
>>>                  self << news
>>>               end
>>>
>>>               div :id => 'content' do
>>>                  self << yield
>>>               end
>>>             end
>>>           end
>>>         end
>>>
>>>         def index
>>>           for post in  <at> posts
>>>             h1 post.title
>>>           end
>>>         end
>>>
>>>         def news               #point 3
>>>           ul do
>>>                      li 'test1'
>>>                      li 'test2'
>>>                      li 'test3'
>>>                      li 'test4'
>>>            end
>>>          end
>>>
>>>       end
>>
>> this code is can't connect News controller.( not print 'this is News get'
>> )
>>
>> i want  connect point1 and point2 .... like a Index controller
>> and change ul list(point3)
>>
>> Do not worry about if my article has typing miss
>>
>>
>>
>>
>>
>> _______________________________________________
>> Camping-list mailing list
>> Camping-list <at> rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>
>
> _______________________________________________
> Camping-list mailing list
> Camping-list <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
_______________________________________________
Camping-list mailing list
Camping-list <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
Magnus Holm | 7 May 11:06 2009
Picon

Re: camping-test error: undefined method `fixtures'

That sounds like a good idea. I've figured out one way to do cookies, but still need to find a way to handle sessions. Pushing later when I've come up with something :-)

//Magnus Holm


On Wed, May 6, 2009 at 22:28, Mikkel Refsgaard Bech <mikkel-a9GCc21zDDe6j0qgbfArMg@public.gmane.org> wrote:

On 05/05/2009, at 22.49, Magnus Holm wrote:

Oh crap. Did that get commited? I was just testing if the memory-database had anything to do with it and forgot to change it back later. Pushing a "fix" tomorrow :-)

Sweet. 

One other thing, I can't figure out how to input some <at> state before I call get/post/etc... I need to test my app while I'm logged in, which just means that some user ID is set in <at> state, is that possible?

E.g.:

test "i can get my secret page when I am logged id" do
  -Z8O6X755vYKpuJRAN1am9g@public.gmane.org_id = 1
  get '/secretpage'
  assert_response :ok
end

Thanks,
Mikkel



//Magnus Holm


On Tue, May 5, 2009 at 22:40, Mikkel Refsgaard Bech <mikkel-a9GCc21zDDe6j0qgbfArMg@public.gmane.org> wrote:
On 03/05/2009, at 21.34, Magnus Holm wrote:

I've pushed out a fix now. Could you verify it?

Works fine, thank you.

Any reason for not using the :memory: database any longer?


Regards,
Mikkel

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list


_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Dave Everitt | 18 May 00:02 2009
Picon

(unknown)

Hi

after many attempts to get the sqlite3 examples running ("unable to  
open database file:"), I found this:

"sqlite3-ruby won’t even link against your libsqlite3 unless SWIG is  
installed."
(http://www.baconbear.com/articles/2006/12/06/osx-sqlite3-and-rails)

Anyone shed any light on this?

I'm running it as a cgi app (no problem with Camping itself, just any  
apps that need sqlite3) under Apache, OS X 10.4.11... sqlite 3.1.3  
(the one that comes with the system and OS X uses)?

Dave Everitt

Gmane