I am looking for a backend solution for an application written in Ruby on Rails or Merb to handle data with several billions of records. I have a feeling that I suppose to go with a distributed model and at the moment I looked at
HBase with Hadoop
Couchdb
Problems with HBase solution as I see it -- ruby support is not very strong, a...
I am looking for the best way to customize my Rails log entries (I want to add the user ID in there). I am using Rails 2.1.2. The only way I've found so far is to override method "add" of class BufferedLogger (as defined in active_support/lib/active_support).
But it ain't pretty: I have to copy all the code in there and it is
closely ...
I'm doing some searching of tags, and some users like "cat" while others like "Cat" Go figure...
Anyways, is there a way to force a particular find to be case sensitive? Such as:
Tag.find(:some-special-option-here)
Any ideas?
...
After much googling I have been wondering what the benefits/differences are between mysql and sqlite3. I am primarily hoping for a speed bump when moving my development database to my production database, although I imagine this will primarily happen in my code. Does any know what the major differences are in performance? ARE there? Or w...
I am using attribute_fu to render a nice block of rows for a particular table.
<%= f.render_associated_form(@foo.bars, :new => 5) %>
I would like to have the bar partial have some notion of a bit of state. (Because the notion is specific to the view, I do not want to externalize this to the Bar model itself and calculate it in the co...
First some background. I am trying to run Community Engine on a fresh install of Ubuntu. CE is a open src social networking plugin running on Rails. I was able to get CE up and running on my windows box w/o issue. I have decided to use Ubuntu 8.10 as my development environment now, and am stuck on this issue. I have researched this for t...
I have some constants that represent the valid options in one of my model's fields. What's the best way to handle these constants in Ruby?
...
Hi.
I would like to implement a payment solution with my Rails site using Paypal Website Payments Standard. (See https://www.paypal.com/IntegrationCenter/ic_standard_home.html). I don't want fancy gateways, and I don't want to go through the hassles related to storing credit card information. I also want to use Paypal IPN for notificat...
Hello,
I have two models indexed for searching (User and Item). I'm trying to do a geo-search across models:
ThinkingSphinx::Search.search('keywords', :geo => [
degrees_to_radians(params[:lat].to_f),
degrees_to_radians(params[:lon].to_f)
],
)
But I only get an error:
Sphinx Error: index item_core,item_delta,user_core,user_delt...
Where is the best place to add a method to the integer class in Rails?
I'd like to add a to_meters and to_miles methods.
...
I'm writing a Rails plugin that includes some partials. I'd like to test the partials, but I'm having a hard time setting up a test that will render them. There's no associated controller, so I'm just faking one:
require 'action_controller'
require 'active_support'
require 'action_pack'
require 'action_view'
class MyTest < Test::Unit...
I want to display the current host and database names in a view.
Where can I get these names?
Are there some predefined environment or global variables?
...
I am writing a Rails app that processes data into a graph (using Scruffy). I am wondering how can I render the graph to a blog/string and then send the blog/string directly to the the browser to be displayed (without saving it to a file)? Or do I need to render it, save it to a file, then display the saved image file in the browser?
...
I found piston seems a decent tool for managing rails plugins, but when I try to do piston convert for my project with git based plugins, it just went dead completely and seems its trying to look for .svn with svn tools.
I am on piston 1.4.0, is that git natively supported or I would have to build from edge?
...
I have a method on the model Category called create_main used to create main categories. Should I use this method in the before(:each) section even though the method itself has to be tested, or should the main category be created manually using rails built in functionality.
...
I don't know why it happens but my form for some reason does not post properly. I am very sure the form contains the required authentication token:
<form action="/account/complete_verify_email/4df78710-e27b-4527-bd2d-71cd2e9a1271" method="post"><div style="margin:0;padding:0"><input name="authenticity_token" type="hidden" value="341b07d...
I have a Rails app that will post some data to another Rails app. For some reasons I don't want to use ActiveResource, so I used something like:
res = Net::HTTP.post_form(URI.parse('http://localhost:3030/support_requests/new'),
{'from'=>'somebody', 'due'=>'2009-03-31'})
It happens that the other a...
I want to work with versioned ActiveRecord associations. E.g., I want to find the object that another object belongs_to as of a certain past date, or the one that it belonged to before that. Does there already exist a library subclassing Rails' ActiveRecord to provide versioned relations? Or some other Ruby library which provides persist...
I'm constructing a simple form in ERB but the HTML produced by the text_field tag makes the for attribute in the label tag invalid.
<div>
<p><%= label_tag "email[name]", "Name" %></p>
<%= text_field :email, :name, :class => "text_field" %>
</div>
Produces the HTML
<div>
<p><label for="email[name]">Name</label></p>
<input clas...
I have to pass parameters between two rails apps. In one side (sender) I have an array of hashes. I have a code like the following to send the data:
http = Net::HTTP.new('localhost', '3030')
result = http.post('/processar_lotes', my_array_of_hashes)
Some questions
Is there any (kind of) serialize or something like this that I ...