Hi all
Since our entire build system is written in Python, I'm wondering if there is anything like Sprouts that I could leverage to integrate Flex builds / development into our codebase?
Sprouts looks nice and all, but I don't want to introduce another build-time dependency to our projects (namely Ruby).
Thanks
...
What I'm trying to do:
I'm building a system where there are different types of post. Setting aside the models, this question is about the routes and the controller
Basically /posts/new should go to an index page of sorts, while /posts/new/anything should look up the type anything and then build a form for creating a new one.
How I'm...
I have the below code, which simply downloads a file and saves it. I want to run it every 30 seconds and check if the remote-file's mtime has changed and download it if it has.
I'll be creating a thread which sleeps 30seconds after every iteration of an endless loop for that purpose, but; how do I check a remote file's mtime without down...
I have a simple jruby+swt based client that collects data on an occasionally connected PC. Now I need to push those records to the server (Rails 2.3). Should I use ActiveMessaging, ActiveResources or Ruby XMLRPC.
This is my current understanding:
ActiveMessaging - best if server to client communication is needed
ActiveResources - hy...
I am implementing a wizard like interface which will help a user configure application settings.
I am using the AASM plugin to guide the user from state to state with the ability to go forward or backward through the configuration. I have implemented a skeleton of this core functionality and it is functioning as expected.
The problem I...
Is there any ready function which converts camel case Strings into underscore separated string?
I want something like this
"CamelCaseString".to_undescore
to return "camel_case_string"
...
Hi,
I'm doing some page scraping for a client and need to connect to their
vpn server. So I have the vpn client running on my linux box, and this
creates a new interface, say ppp0. Now, when I run Mechanize/open-uri,
etc. I need to be able to bind specifically to this particular
interface, because the other interfaces are to the intern...
I would like to specify that
:output_core depends on :build_core
:build_extension depends on :build_core
:output_extension depends on :build_extension and :output_core
How would I specify that last one? That in order to run the :output_extensions tasks both :build_extensions and :output_core must have completed?
...
Is there a way to stop a windows service (possibly on a remote machine) using ruby?
...
I'm creating an API service which allows people to provide a URL of an image to the API call, and the the service downloads the image to process.
How do I ensure somebody does NOT give me the URL of, like, a 5MB image? Is there a way to limit the request?
This is what I have so far, which basically grabs everything.
req = Net::HTTP...
Is there any worthy Ruby method to count the number of digits in a float? Also, how do I specify the precise when to_s float numbers?
...
Hi,
I have this funny situation whereby I see my before_filter executing multiple times for one access.
My filter is called auth_user_filter and it logs using logger.info("Yada Yada Yada"). It gets set globally to run before all actions. When I access an action over my browser it prints the following (depending on what call it is)
The...
I'm trying to do file uploads with ruby 1.8 and it seems like there are no good out-of-the-box solutions. They all seem to need some 3rd party patch or fork of a project to work. I would use mechanize but I actually need to interface with an xml api and mechanize seems to be made specifically for dealing directly with webpages. I've trie...
Sort of a quick question. I'm writing:
puts "%.3f %.4f %.5f" % [3.998877, 3.998877, 3.998877]
and get the following output:
3.999 3.9989 3.99888
sprintf simply rounds the numbers. How do I restrict that rounding?
...
Working on OS X, trying to get Rails Exception Notifier plugin to send out emails. I have verified the following:
I can successfully send email from my app
I am creating a test error (1/0 in one of my actions).
Current plugin installed...
script/plugin install git://github.com/rails/exception_notification.git
In ApplicationController....
Sinatra has a "before" filter, but is there an easy way to implement an "after" filter?
...
what would be the most efficient way of grabbing all texts between html tags ?
<div>
<a> hi </a>
....
bunch of texts surrounded by html tags.
...
using nokogiri,
doc = Nokogiri::HTML(your_html)
doc.xpath("//text()").to_s
this does the job, however, it puts everything into one flat text.
i need to take each text surrounded via html tags
<b> text</b>
<h1>text3</b>
and put them into array. ["text", "text3"]
what is the recommended action ?
i thought of doing
doc.xpath("*")....
How do I make the following string cast:
"ln(5*x)" -> "Math.log(5*x)"
...
I am trying to stage an app on Heroku that uses the Authlogic plugin. The Logs show me this error. I first thought there is a problem with the gem version, but I tried several: 2.1.1, 2.1.2, 2.1.3.
But I tried deploying the authlogic example but it throws the same error.
Thank you for your time.
Processing UserSessionsController#new (...