Hi Jon,

I am also seeing: "irb: warn: can't alias context from irb_context."
It seems that this is caused by explicitly requiring 'spec' in your
application.

If I don't require 'spec', I get this error upon running 'merb -i':

/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/
dependencies.rb:276:in `load_missing_constant': uninitialized constant
Spec::Example (NameError)
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
active_support/dependencies.rb:468:in `const_missing'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/
test/test_ext/rspec.rb:38
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
active_support/dependencies.rb:510:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
active_support/dependencies.rb:355:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/
active_support/dependencies.rb:510:in `require'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/
test.rb:15
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/
rack/adapter/irb.rb:98:in `start'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/
server.rb:151:in `bootup'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core/
server.rb:40:in `start'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/lib/merb-core.rb:
115:in `start'
        from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.8/bin/merb:11
        from /usr/bin/merb:19:in `load'
        from /usr/bin/merb:19

I'm on merb edge (last update Oct 3).

Any ideas ?

Thanks,

Ahsan

On Oct 3, 1:52 pm, Jon Hancock <[EMAIL PROTECTED]> wrote:
> Still playing with this new thor based merb structure.
>
> Lets assume I have a system with only ruby, gems, and thor.
>
> I then do the following:
>
> > mkdir testapp
> > cd testapp
> > curl -Lhttp://merbivore.com/merb.thor> merb.thor
> > thor merb:tasks:setup
>
> This leaves me with a bin directory with autospec, rake, rake2thor,
> spec, thor
>
> So how do i create my new merb app structure?  I go to the next step:
>
> > bin/thor merb:edge --install
>
> # wait a LONG time!!!  I'm in Shanghai.
>
> This outputs:
> Successfully installed rubyforge-1.0.0
> Successfully installed hoe-1.7.0
> Successfully installed RubyInline-3.7.0
> Successfully installed ParseTree-2.2.0
> Successfully installed ruby2ruby-1.1.9
> Successfully installed merb-action-args-0.9.8
> Successfully installed merb-assets-0.9.8
> Successfully installed highline-1.4.0
> Successfully installed diff-lcs-1.1.2
> Successfully installed templater-0.3.0
> Successfully installed merb-gen-0.9.8
> Successfully installed haml-2.0.3
> Successfully installed merb-haml-0.9.8
> Successfully installed builder-2.1.2
> Successfully installed merb-builder-0.9.8
> Successfully installed mailfactory-1.4.0
> Successfully installed merb-mailer-0.9.8
> Successfully installed merb-parts-0.9.8
> Successfully installed merb-cache-0.9.8
> Successfully installed merb-slices-0.9.8
> Successfully installed merb-jquery-0.9.8
> Successfully installed merb-helpers-0.9.8
> Successfully installed merb-more-0.9.8
> Writing executable wrapper /Users/jhancock/src/testapp/bin/merb-gen
>
> ok, do I have enough to bootstrap my app structure now?
>
> Lets try...
>
> > bin/merb-gen app .
>
> that gives me this output:
>
> Generating with app generator:
>      [ADDED]  spec
>  [IDENTICAL]  gems
>      [ADDED]  Rakefile
>  [IDENTICAL]  merb.thor
>      [ADDED]  public/favicon.ico
>      [ADDED]  public/images/merb.jpg
>      [ADDED]  public/merb.fcgi
>      [ADDED]  public/robots.txt
>      [ADDED]  .gitignore
>      [ADDED]  app/controllers/application.rb
>      [ADDED]  app/controllers/exceptions.rb
>      [ADDED]  app/helpers/global_helpers.rb
>      [ADDED]  app/models/merb/session.rb
>      [ADDED]  app/views/exceptions/internal_server_error.html.erb
>      [ADDED]  app/views/exceptions/not_acceptable.html.erb
>      [ADDED]  app/views/exceptions/not_found.html.erb
>      [ADDED]  autotest/discover.rb
>      [ADDED]  autotest/merb.rb
>      [ADDED]  autotest/merb_rspec.rb
>      [ADDED]  config/environments/development.rb
>      [ADDED]  config/environments/production.rb
>      [ADDED]  config/environments/rake.rb
>      [ADDED]  config/environments/test.rb
>      [ADDED]  config/init.rb
>      [ADDED]  config/rack.rb
>      [ADDED]  config/router.rb
>      [ADDED]  public/stylesheets/master.css
>      [ADDED]  app/views/layout/application.html.erb
>
> ok, seems good.
> Lets see if the default config starts up clean:
>
> > bin/merb -i
>
>  ~ Parent pid: 21395
>  ~ Compiling routes...
> irb: warn: can't alias context from irb_context.
>
> no, now what?  I assume this is just a bug in the latest HEAD?  Lucky
> me ;)
>
> I need other stuff for my real app:  mongrel, datamapper, do postgres,
> and other gems my app requires.  But I want to see what basic (not
> necessarily minimal) install I can create and just get merb running.
>
> Maybe adding mongrel fixes things...
>
> > bin/thor merb:gems:install mongrel
> > bin/merb -i
>
>  ~ Parent pid: 21467
>  ~ Compiling routes...
> irb: warn: can't alias context from irb_context.
>
> nope, same problem...
>
> > bin/merb
>
>  ~ Parent pid: 21487
>  ~ Compiling routes...
>  ~ Cluster: 0
> merb: worker  ~ Starting Mongrel at port 4000
> merb: worker  ~ Successfully bound to port 4000
>
> ok, that works... I guess there is a current bug with interactive
> mode?
>
> Was this the correct approach to bootstrapping a new app structure?
>
> thanks, Jonhttp://shellshadow.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to