how do you include merb in thor tasks? In rails rake tasks we use something like
task :import_assets => :environment do
which makes it possible to load models inside tasks, but how is this done using thor and merb?
desc 'booh', 'test datamapper'
def booh
Location.new
end
the line above gives me something like:
wikipedia.thor:...
I need to spend some serious time reading about changes in Ruby 1.9.1 and upcoming Rails 3/Merb. Can people suggest any articles to read?
Not really looking for one answer, just kinda looking for a compilation of resources people are using to keep up with what's coming and what currently exists, so if you stop by, let me know what you'r...
So Rails and Merb are sort of merging in Rails 3.0? Thats how its been described to me anyway. This means that a lot of what made Rails, Rails will now be moved to plug-ins so that it can be more lightweight. HOwever, what are those plug-ins going to be and as a new Rails developer, what are THE must have - and also more mature - plug-in...
Hello there
Is there a way to set session cookie work for all subdomains (e.g. *.domain.com) from Merb configuration file (config/init.rb)
Looking for something like
Merb::Config.use do |c|
c[:session_cookie_domain] = '.domain.com'
end
...
I'd like to access the cookies from an external app from merb but use the cookies to verify the user who sends the request to the external app.
The example code is here:
http://pastie.org/778601
This looks fairly straightforward to me so I'm not quite sure why it isn't working. Obviously you'll need to replace the session_secret_key an...
I'm looking to use render like so:
render :action => 'page#form'
I also tried this:
render :template => 'site/page#form'
That didn't work either. The form on this particular page is at the very bottom, and if any errors occur on submission I'd hate for the user to be defaulted to the top of the page. I also need to use render (not ...
Hi,
after posting a question related to nginx, I'm a bit further with my investigations: The problem is, that the merb framework timeouts after about 30 seconds. If i tell the underlying nginx-server not to timeout, merb does, and I can't find a way to tell it not to; I need to do requests that take up to some minutes.
Any hints? Thank...
I'm porting an application from Merb 1.1 / 1.8.7 to Rails 3 (beta) / 1.9.1 that uses JSON responses containing HTML fragments, e.g., a JSON container specifying an update, on a user record, and the updated user row looks like . In Merb, since whatever a controller method returns is given to the client, one can put together a Hash, assign...
I'm looking for help destroying a nested resource in Merb. My current method seems near correct, but the controller raise an InternalServerError during the destruction of the nested object.
Here comes all the details concerning the request, don't hesitate to ask for more :)
Thanks,
Alex
I'm trying to destroy a nested resources usin...
According to RFC2616 if I return 401 in response to a request to my (Ruby) server, I "MUST include a WWW-Authenticate header field." Is this really true? Not setting the header seems to have no negative impact. I'm using Merb as a web framework and it doesn't force me to set the header.
Am I missing something or is this a rule more hono...
Given the code below ...
Net::HTTP.start('localhost', 4000) do |http|
#
# usual stuff omitted for clarity
#
@response = http.request(req)
end
... if a (well behaved) server returns a 401 (Unauthorized) response, how do I get at the WWW_Authenticate header?
The best solution I've got isn't at all good ...
class Net:...
I've recently started looking at Merb, for use with some small projects around the office. I'm trying to set up my first project following the docs, and am encountering an exception such as:
foo:beta user$ merb
Merb root at: /Users/user/code/merb/beta
Loading init file from ./config/init.rb
Loading ./config/environments/development.rb
...
Hi -
I am using Merb. I can't seem to get activemerchant to load using Bundler. All my other gems load fine.
In my Gemfile I am using:
gem 'activemerchant', :require => 'active_merchant'
Here is the relevant error:
uninitialized constant ActiveMerchant::Billing::AuthorizedNetGateway
Anyone run into this or have any ideas?
Thank...
Is there anything like Merb Parts in Rails 3 out there now?
I've seen Rails Cells, but felt like nobody was using them.
What are your thoughts? Are these suitable for widgets?
...
I want to test across multiple sessions using webrat in merb. Apparently, this is fairly easy to accomodate in Rails via: http://erikonrails.snowedin.net/?p=159.
Following the same logic, I am trying to do something that follows that pattern for merb and webrat. Here is an attempt (which does not work because MerbAdapter does not respon...
I'd like to generate a lot of merb views (around 350.000) and save them to separate files programmatically (they will actually be XML files). One option would be to simply wget them, but that is too slow (already tried it, but takes around two days). For rails I've already found an answer but that doesn't work with merb.
...
I have a question regarding merb dependency with sqlite. I am going to install merb on my m/c and I don't have sqlite installed on my m/c . I tried this command "gem install merb" and saw following error. If there any way to install merb with mysql please tell me.
Building native extensions. This
could take a while... ERROR: Erro...
while i am running rake jobs:work.
I am getting this error.
** Invoke jobs:work (first_time)
** Invoke merb_env (first_time)
** Execute merb_env
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Delayed
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:443...
This is a theoretical question as much as a practical one. I just can't wrap my head around how all these technologies mesh...
I have heard various things including:
"HAML and SASS are included in Merb"
"SASS is part of HAML"
"HAML works in Merb, but to use SASS you need to add the 'merb-haml' dependency"(?)
"You need Compass to run ...
Im trying to figure out the best way to map simple routes into one url. Application contains of 4 models: Location, Category, Budget, Company. But each model could be mapped to single url like this. For real-world example you can check out http://sortfolio.com/
/chicago <- Location
/3k-5k <- Budget
/bars <- Category
/company-name <- Com...