I'm building some scripts for automatically setting up a developer's machine so everyone has an identical setup & configuration.
One thing in particular I want to automate is the configuration in IIS7. We have a bunch of web apps which need to be hosted locally and would ideally like them all set up automatically. Does anyone know of a...
== AddIpToTutorials: migrating ===============================================
-- add_column(:tutorials, :ip_address, :string)
-> 0.0022s
== AddIpToTutorials: migrated (0.0022s) ======================================
>> t = Tutorial.new
..
>> t.ip_address
NoMethodError: undefined method `ip_address' for #<Tutorial:0x2b3b35f5a690>
...
Can someone explain me what happens when I add such dependency to my tasks? Which files are loaded etc.?
...
i have two tables
attachments:
name, doc_name, doc_type, doc_size, cat
and media:
name, doc_name, doc_type, doc_size, cat
how do I write a migration file such that it takes all the entries from both tables and puts them into a new Files table?
...
When I run rake from within a batch file (.bat) it will exit immediately after the rake script has completed and will not execute any commands after it.
e.g. for the following, it will execute rake but not change directories
rake
cd ..
Anyone know how to stop this behaviour?
...
Is there a way to limit the number of instances of a rake task?
I have a rake task for reading emails that runs every 5 mins as a cron job.
Sometimes the rake tasks takes more than 5 mins to complete and another
rake task is launched before it finishes.
There are hacky workarounds to check ps -Af inside the rake file but I
am looking...
Im about to turn in to my school library a project which was done on rails.. this project is to be stored in a cd so that the school can have a copy of all my work for future reference if anyone wants to.... I want a simple way for people to install my project.. right now, my app depends on several migrations I made throughout the develo...
I have a rails project that uses multiple legacy databases.
I would like to perform tests that verify that the models are linked together correctly. This is being done so that the team can use TeamCity (by JetBrains) to perform automated testing.
database.yaml:
test:
...
database: application_test
...
admin:
...
<% if RAILS_E...
Goal: Using a CRON task (or other schedule event) update rails database with nightly export of data from an existing system.
All data is created/updated/deleted in an existing system. The website does no directly integrate with this system, so the rails app simply needs to reflect the updates that appear in the data export.
I have a .t...
I have recently started using Rake for my personal projects, mainly because I am not into make anymore and prefer to avoid learning a custom language just for builds.
However, based on a quick google, there don't seem to be any many non-ruby projects using rake. And certainly none with any recall value.
Am I right? Are there any non...
I know this is not best practice, and most likely shouldn't even be used, as thats what migrations are used for, but I was wondering if its possible to execute migration specific commands in a regular rake task. Something like:
namespace :dummy do
task :update => :environment do
add_column :users, :deleted, :boolean, { :null =...
So, whenever I run "rake spec" in my application directory, I see this:
admin@nurvus:~/workspace/spec $ rake spec
(in /Users/admin/workspace/)
DEPRECATION WARNING: Rake tasks in vendor/plugins/abingo/tasks, vendor/plugins/delayed_job/tasks, vendor/plugins/funkytown/tasks, vendor/plugins/funkytown/tasks, vendor/plugins/git_helper/tasks, ...
I know that you can do something like this to load the rails environment:
task :my_task => :environment do
MyModel.find(1)
end
But it seems the code in the models are not executed. I am using acts_as_audited, and there is a nice class function which retrieves all models which are being audited. The call looks something like:
...
I've put this information into a pastie, but repeated it here (pastie link http://pastie.org/private/4vprzwhllqv35egrf8jzwg )
The problem showed up in my own project, but I have no idea what i'm doing wrong: here's the full output:
$ rake test
(in /Users/me/Projects/version-three)
/Users/me/.rvm/rubies/ruby-1.9.2-rc2/bin/ruby -I"lib:...
I am getting this error
rake db:migrate (in
/Users/john/Sites/my_app) rake aborted!
Don't know how to build task
'db:migrate'
When I trace the error I get
rake aborted! Don't know how to build task 'db:migrate'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
/usr/local/lib/ruby/gems/1.8/gems/rake-0....
I'm trying to setup a Rake script to run all my IronRuby rspec tests. The tests need to have access to internal constructors and methods. IronRuby supports this with the -X:PrivateBinding switch on ir.exe.
So, for example, if my test is called some_tests.rb, the following command works:
ir -X:PrivateBinding -S spec some_tests.rb
Ho...
I have rake tasks which i want to run in proper sequence.
I want to run one rake task which run other rake tasks in proper sequence.
How may i do that?
...
I've been developing RoR apps for about a month in my Windows Laptop, however everytime that I run the tests it takes forever to finish (10+ minutes).
On a MacBook Pro with similar hardware it runs in a fraction of the time (2 minutes).
Can you guys give me any tips for speeding the whole thing up? or should I consider switching my RoR ...
Is it possible from within a rake task to get a list of tasks in a namespace? A sort of programatic 'rake -T db' ?
...
Hello everyone,
I am currently running ruby-1.9.1 installed via RVM. I have been looking at using Merb, but when I try and run it I get this error:
sam@shiny-dev:~/Projects/mojo$ rake db:migrate
(in /home/sam/Projects/mojo)
Merb root at: /home/sam/Projects/mojo
/home/sam/.rvm/gems/ruby-1.9.1-p378@merb/gems/dm-validations-...