I recall when I first read Pragmatic Programmer that they suggested using scripting languages to make you a more productive programmer.
I am in a quandary putting this into practice.
I want to know specific ways that using Python or Ruby can make me a more productive .NET developer.
One specific way per answer, and even better if you ...
Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more express...
I am (quite) an experienced programmer but totally new to Ruby and Ruby on Rails.
RoR looks great to get working quickly, specially the automatic screen generation for CRUD operations.
It really it gets you productive quickly.
The questions is with the last 20% of the work, when I must finish my application. Won't RoR conventions stan...
I have a cron job to run a Ruby script, which runs fine on the command line (from user "user"), but the cron fails because it cannot find a ruby gem TMail. I manually installed the tmail gem to my ~/.gems/ dir, pointed to by my ~/.bashrc script, as suggested by Nate.
When invoked manually from the shell (on deadpool server)
./home/...
I have a problem with GeoRuby conflicting with Authlogic.
I set up a very simple application that only lets me register and log in and out useing Authlogic. This works fine.
Then I added GeoRuby to the application and I get the error:
wrong number of arguments (1 for 2)
when the current_user is called in the view.
I'm quite new to...
I am looking to obfuscate and minify dynamically written javascript with ruby. Does anyone have any suggestions? Some kind of apache module that would intercept the .js file and obfuscate it before it was served would be ideal.
...
I'm looking for a way to programatically detect the location of the Apache config directory, and the name of the configuration file. Bonus points if this is in Ruby or Bash.
...
I have decided to give a try to TDD and BDD on my already started project, encouraged by answers to questions like this:
http://stackoverflow.com/questions/294909/should-i-start-using-tdd-on-a-project-that-doesnt-use-it-already
I am struggling to really start with it.
My project (opensource, hosted in http://gitorious.org/rubots) is gam...
I always hear about UML being used in Java projects but never in Ruby ones. Is this just a cultural difference or is there less of a need for modeling in Ruby development because it's part of a more 'agile' culture?
...
Hello, I have the same problem as http://stackoverflow.com/questions/1098503/how-to-unsupress-local-echo but none of the solutions in that thread are desirable.
Specifically, I'm using telnet for communication with a simply Ruby program that requires authentication to connect remotely. When the user is prompted for a password I want to ...
In C#, There is a method AddDays([number of days]) in DateTime class.
Is there any kind of method like this in ruby?
...
I'm testing an app that's basically a message-handling application - a message comes in, it's content is analysed, then it's sent somewhere else for processing. The app isn't built in Ruby.
As you might imagine, the main testing approah consists of generating a whole bunch of different types of (quite complex) messages, loading them in...
Essentially I'm wondering if the following can be done in Ruby.
So for example:
def bar(symbol)
# magic code goes here, it outputs "a = 100"
end
def foo
a = 100
bar(:a)
end
...
I want to distribute a ruby script to many of my friends, because it's useful. But how do I know what else they might have to install? I mean at the top of the script, there is this:
require 'rubygems' #
require 'activerecord' #TODO: figure out what packages this depends on
require 'activesupport' #
require 'duration' #
Tha...
So I am able to pass in arguments as follows
desc "Testing args"
task: :hello, :user, :message do |t, args|
args.with_defaults(:message => "Thanks for logging on")
puts "Hello #{args[:user]}. #{:message}"
end
I am also able to load the current environment for a Rails application
desc "Testing environment"
task: :hello => :environ...
I'm trying to parse a webpage using open-uri + hpricot but it seems to be a problem in the parsing proccess as the gems don't bring me the things I want.
Specifically I want to get this div (whose id is 'pasajes') in this url:
http://www.despegar.com.ar
I write this code:
require 'nokogiri'
require 'hpricot'
require 'open-uri'
docu...
I tried for about 3-4 hours trying to get the mysql gem to install for ruby 1.9.1 on snow leopard. The mysql gem used to work just fine on 1.9.1 before I upgraded to snow leopard. I uninstalled MySQL server and gem from my machine. I then downloaded and installed: mysql-5.1.37-osx10.5-x86_64.dmg. I have been able to assert that this ...
Hi,
Again with the soap.
I am trying to build a header using soap4r that is supposed to look like this
<SOAP-ENV:Header>
<ns1:UserAuthentication
SOAP-ENV:mustUnderstand="1"
SOAP-ENV:actor="http://api.affiliatewindow.com">
<ns1:iId>*****</ns1:iId>
<ns1:sPassword>*****</ns1:sPassword>
<ns1:sType>affiliate</ ns1:sType>
</...
strftime('%A, %B %d')
Will output Monday, August 31
Any way to get it to do Monday, August 31st?
...
The title really really doesn't explain things. My situation is that I would like to read a file and put the contents into a hash. Now, I want to make it clever, I want to create a loop that opens every file in a directory and put it into a hash. Problem is I don't know how to assign a name relative to the file name. eg:
hash={}
Dir.g...