Displaying 20 results from an estimated 4000 matches similar to: "Trying to use ActiveRecord STI but fails"
2008 Jan 18
5
How do I pass form values from POST controller specs?
Hi there
I just started my first Merb app and I''m running into some weird
things in Specs. When I do:
describe "create action" do
it "should create a new project" do
project_params = {:name => ''bekkunin''}
Project.should_receive(:create).with(project_params)
controller, action = post(''/projects'', :project
2007 Nov 07
2
merb 0.4.0 session issue
Not sure if anyone else has had this problem.
I was running on merb edge fine a few days ago. Last night I went to
merb 0.4.0 via gem install and now any call to session[:foo] causes an
error >> undefined method ''[]'' for nil:NilClass
I have uninstalled and reinstalled merb with no luck.
dependencies.rb
use_orm :activerecord
merb.yml
:session_store: active_record
Gems
2007 Nov 08
1
Back to ruby2ruby?
Hello guys.
I missed a lot of the development before 0.4 got out (btw, excellent work!).
I checkout last night the merb-trunk code and run the specs, found
that everything passes with 1 pending, but no errors or failures about
missing ruby2ruby.
There is a ticket (#274)[1] that discuss this, but I remember we
discussed this back in September about depending on RubyInline...
Also, the merb gem
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other
than Erubis are not loaded automatically (Haml, XMLBuilder). Either
this should be fixed, or the documentation should be updated to
instruct people how to use non-Erb template engines.
Apparently the solution is to do something like this in merb_init.rb:
::Merb::AbstractController.register_engine
2006 Dec 01
2
ActiveRecord Sessions
I am considering using merb to process file uploads. For the most
part I''m going to keep it lean and mean. I would however like to
access my active_record_session from my Rails app. Is this built into
merb yet?
Or is it OK to just add require ''action_controller/session/
active_record_store'' to merb_init.rb and then create my own session
object
2007 Jul 29
7
Merb test harness
Ezra,
* test harness in new generated merb apps with helpers for testing
merb without starting a server.
* pin down plugin arch
Seems to me that these two tasks go together unless you want to have
rspec built in Merb.
Regarding the test harness, my understanding is that:
- a developer should be able to easily write specs against a merb application.
- a developer should not need to start a merb
2007 Feb 15
1
wrong startup information in production environment
Hi,
I check out the last codes from merb repository. And the startup
information for production environment just like that:
======================================================
dev:/var/www/apps/upload_merb/current/log# /etc/init.d/merb_init start
Merb started with these options:
---
:template_ext:
:html: :herb
:js: :jerb
:xml: :xerb
:config: dist/conf/upload.conf
:drb_server_port:
2007 Mar 08
6
Transfer-encoding: gzip
Hello!
What is the simplest way to make merb respond to the client sending Accept-Encoding: gzip?
Just checking if it exists, otherwise I''ll implement it myself.
Regards,
Magnus
2007 Sep 22
9
skeleton and configs
Hi people, just thought I''d mumble out my thoughts on merb''s apps
directory structure and config concepts and see what other people are
feeling...
the app dir:
mvc/application is layed out as expected....maybe
without the mailer by default (another discussion)
the config dir:
I really think that it''s confusing to have such a
mixture of ways to configure some
2007 Aug 28
1
what''s the view format in trunk?
dumb question but what''s the view format in trunk?
I have a simple router:
Merb::Router.prepare do |r|
# default route, usually you don''t want to change this
r.default_routes
# change this for your home page to be avaiable at /
r.add ''/'', :controller => ''upload'', :action =>''new''
end
I have a simple controller
2007 Dec 07
4
mrblog rake task fails
Hi all,
I''m trying to run the mrblog sample application but somehow the rake
task fails:
--
Los-Angeles:~/Projects/mrblog Ulf$ rake db:schema:load --trace
(in /Users/Ulf/Projects/mrblog)
rake aborted!
Don''t know how to build task ''db:schema:load''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1472:in `[]''
2007 Aug 31
3
Bootstrapping from SVN
Is there a simple way to bootstrap merb directly from the Subversion
repository, rather than first installing it as a gem?
I can do the following if I already have an old gem lying around:
merb -g testapp # using an old gem
cd testapp
rake merb:freeze_from_svn
Unfortunately, that means I''m using an old version of the generator. So for
example, when I just tried this,
2006 Dec 27
3
ARSession Woes!
I''m having an issue with ARsessions... I have a rails app AND a merb app
both under the same domain... I have redirects working for this to be
seamless... however, the session started on merb is different than the
session started in the rails app... like so..
http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y
Any ideas why?
The only difference I see, but dunno where to change this, is
2007 Jan 03
1
Specifying load path...
All,
How can I specify a load path in merb ? I have some classes in a lib
directory that needs
to be in the load path. Not sure how to accomplish that with merb....
Thanks,
Fernand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070103/2c960f36/attachment.html
2007 Dec 19
2
Nested partials losing the view context ?
Hi all !
I can''t seem to make a simple thing work... The code is here:
http://pastie.caboo.se/130660
Essentially, that''s a form with a couple of partials. The backtrace is
included in the pastie. It looks like the context for the current view
is lost when a partial is rendered. In _series.html.erb:2, I use
"series" to get the name. This is the parameter I
2007 Sep 02
17
A Proposal To Magically Remove ''params''
I have a magical proposal for the anti-magic web framework.
Controller methods do not use arguments and yet expect arguments. This
is handled through this params hash because we don''t know in advance
what parameters a client could pass to Merb. But in almost every
instance, it is too much to know all the query parameters - one
doesn''t care if the user threw in an extraneous
2007 Oct 30
1
Merb - Losing connection to MySQL
Hello,
Once or twice a day I''m losing connection to MySQL and this error is
generated:
Mysql::Error: Lost connection to MySQL server during query: INSERT INTO
pictures (`content_type`, `name`, `size`, `thumbnail`, `updated_at`,
`pictureable_type`, `description`, `pictureable_id`, `filename`, `height`,
`user_id`, `parent_id`, `created_at`, `width`) VALUES(''image/jpeg'',
2007 May 14
7
Help a newb with 0.3.1
Hi, first off thanks Ezra for Merb - it''s certainly interesting and
I''m keen to have a play. However, I''m having difficulties in getting
started. I''ve followed the docs for setting up mrblog and everything
seems to be installed correctly, and merb appears to start fine:
$ merb
you must install the markaby gem to use .mab templates
you must install the
2007 Jan 19
5
Merb Init Script
I''m trying to emulate the mongrel_cluster_ctl but it takes a -c
conf_file option... meaning I can run it from anywhere as long as I
tell it where the conf file is. Merb doesn''t have that capability does
it? (it has an additional/supplemental config like mup.conf etc)
Do I have to be under the merb_app root /path/to/merb/app/ to be able
to run merb?
Let me know.
Thanks,
2007 Dec 19
4
Questions on writing plugin for merb
Hey all,
I am looking to write a plugin for merb and have a few queries about
how to best go about it. I have a few questions (sorry if some are
very merb newbie ones):
- It seems all the plugins are gems; I can just add dependencies (my
plugin will require soap4r) as per any usual gem spec?
- If I want my plugin to add some new generate functionality? Is this
possible? If so, are there