Displaying 20 results from an estimated 50000 matches similar to: "Rails + require returns ??"
2007 Sep 04
5
Xml templates...
I was looking in using an xml_builder template to do something like:
blee.xerb
xml.blees do
<% for blee in @blees %>
xml.blee = blee.name
<% end %>
end
It looks like the xml_builder template can''t expand the erb tag.
It this not the correct way to expand and xml template ?
Thanks !
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Jan 03
2
Using helpers...
All,
I am getting an undefined method exception while trying to use a helper
method
in a xerb file.
I am running version 0.0.8
module Merb
module FredHelper
def blee( args )
....
end
end
end
In the xerb template I have
xml.bobo blee( args )
At runtime I am getting undefined method ''blee''
I tryied
2006 Jan 12
2
Engines issue: rake test_plugins failing when it shouldn''t
I create a simple engine with a simple controller:
class FredController < ApplicationController
def hello
render :text => ''Hello, world!''
end
end
and I create a simple functional test within the engine:
class FredControllerTest < Test::Unit::TestCase
...
def test_hello
get :hello
assert_response :success
end
2007 Jan 12
5
Rails session parasite...
All,
I see this item on the merb-0.0.8 release notes
Added rails session parasite mode.
I am assuming merbs can piggy back off the rails current session.
How does one achieve that ?
Thanks
Fernand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070112/0803f46e/attachment.html
2007 Sep 04
1
Couple of questions for Merb 0.4
All,
I have just updated to the latest release of merb 0.4 and I am
wondering how I can get my controller changes
to reload without bouncing the server ? I am running in dev mode
but my changes to my merb controller don''t
seem to get picked up on new requests.
Also say I have a controller that needs to render an alternate
xml format ie something like:
2007 Dec 19
3
Trapping custom exceptions in merb 0.5.0
Hi,
I have the following setup:
class Fred < Application
class InvalidKey < Merb::ControllerExceptions::Unauthorized; end
def blee
raise InvalidKey unless key
end
end
I have added a view exception template in
views/exceptions/invalid_key.html.erb
but I am not seeing the exception page being rendered ?? The request
seems to correctly
go to
2008 Jan 23
0
Action caching...
All,
I am running Merb 0.5.0. Is there a way to specify an expiration time on
an
action cache, besides physically calling expire_action ?
I have been looking at the code and I was not able to find support for
that
Something like
cache_action( :fred => 30*60, :blee => 60*60 )
would expire fred in 30 min and blee in 1 hour...
Any tips on how to achieve that ?
2006 Oct 11
6
Indexing problem 10.9/10.10
Sorry if this is a repost- I wasn''t sure if the www.ruby-forum.com
list works for postings.
I''ve been having trouble with indexing a large amount of documents(2.4M).
Essentially, I have one process that is following the tutorial
dumping documents to an index stored on the file system. If I open the
index with another process, and run the size() method it is stuck at
a number
2011 Jul 26
0
connect to DRb server from rails controller ?
I haven''t done any DRb stuff in awhile, but I used to connect to a DRb
server from
a rails controller. I''ve never tried it in rails 3 and am wondering if
Rails 3 is stricter about something like this or why it hasn''t worked
thus far.
My server/client code and error are shown below:
SERVER:
require ''drb''
class ParserSvc
def initialize
end
2007 Mar 13
0
aliasing, require_dependency and require
I''d really appreciate it if someone [with a decent understanding of the
rails Dependencies mechanism] could help me explain the behaviour seen
in this pastie.
http://pastie.caboo.se/46630
The desired behaviour is simply aliasing a method in
ApplicationController from a plugin while retaining automatic reloading
in dev mode.
The pastie is basically divided into 4 parts:
- Setup of
2007 Sep 05
5
Reloading ??
All,
So I got passed my initial hurdles with merb 0.4. And all seems to work
very nicely.
Thank you all for your help !
One thing though, why should I have to bounce the merb server when I
change
my controller or associated classes ? Am I missing something ?
I am having flash back to my java days where I now have to reflect on
what changed
and bounce the server accordingly...
2006 Aug 23
3
Auto-Reload...
Hi,
Not sure if this was posted before....
Is there a way to tell the backgroundrb server to reload workers a la
rails in dev mode ?
It seems that I have to cycle the server everytime I change my
workers...
Also has anyone cooked up a script for monitoring the background drb
process on a nix OS ?
ie rc init for server startup and making sure the process is happy
2013 Jan 17
3
How do I manage puppet.conf? Let me count the ways.
In a recent post Nikola Petrov summerized methods for managing config
files such as puppet.conf:
* use augeas with virtual resources
* use the concat module
* use the standard template function with multiple arguments; look at
http://docs.puppetlabs.com/guides/templating.html and scroll down to
"Combining templates"
I can add a few others:
* use the ini_setting type
2008 Jan 18
3
Please help
Hello all,
I have developed a RESTFul webservice in RoR. Here under is the controller
---------------------------------------------------------------------------------------------------------
class PeopleController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
2010 Aug 28
0
Rails 3 rendering XML problem
I have Rails 3 application (running Rails RC1), and I have the following
controller:
class PluginsController < ApplicationController
respond_to :html, :xml, :json
def index
@plugins = Plugin.all
respond_with(@plugins)
end
end
If I try to render http://localhost:3000/plugins it works fine, showing
me the HTML version. If I try to get http://localhost:3000/plugins.json,
it also
2014 Oct 20
0
dbHasCompleted() always returns TRUE for POSTGRES Database with RJDBC?
Hello Simon, Hello everyone,
I have a problem with retrieving database-queries chunkwise. In my query
(Postgresql-Database, Postgres-Version 9.1) dbHasCompleted seems to
always return TRUE.
dbGetQuery works for smaller tables, but not for the whole query, since
then a Heap-Overflow-Error will occur (and a Error:
"java.lang.OutOfMemoryError: GC overhead limit exceeded" when trying to
2007 May 15
2
openURI not capturing pages from the same rails app
Hi,
I am using standard Ruby library openURI to capture the HTML code from
other pages. The problem openURI does not work for capturing pages from
the same rails application.
Here is the code:
class CdCreatorController < ApplicationController
require ''open-uri''
def generate
lines = []
file = open("http://127.0.0.1:3001/cd_creator/product/1"){ |f|
2006 Jan 23
2
require rmagick
Hello,
I''m trying to use rmagick in a helper script (for auto-generating image sizes) and I''m not sure where I should be calling ''require''.
currently I have:
require ''RMagick'' at the top of my controller:
class FilmsController < ApplicationController
require ''RMagick''
but that''s giving me an error:
2018 Mar 18
1
BUG: tools::pskill() returns incorrect values or non-initated garbage values [PATCH]
For the record, I've just filed the following bug report with a patch
to https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17395:
tools::pskill() returns either random garbage or incorrect values,
because the internal ps_kill() (a) it does not initiate the returned
logical, and (b) it assigns the logical returned the 0/-1 value of C's
kill().
# Example 1: returns garbage due to
2006 Aug 08
1
Problem installing the plugin...
Hi,
I am running ruby 1.8.4 rails 1.1 on Mac OSx and I am getting the
following error installing the plugin. Any ideas ? ( BTW This is a brand new
rails app )
Thanks !!
ruby script/plugin install svn://rubyforge.org/var/svn/backgroundrb --force
subversion/libsvn_wc/lock.c:630: (apr_err=155007)
svn: ''/Users/fgaliana/work/samples/fred/vendor/plugins'' is not a working
copy