Rake just one migration
Hi, I'm trying to run just one migration out of a whole bunch in my rails app. How can I do this? I don't want to run any of the migrations before or after it. Thanks. ...
Hi, I'm trying to run just one migration out of a whole bunch in my rails app. How can I do this? I don't want to run any of the migrations before or after it. Thanks. ...
Hi, moved a rails app of mine onto a new server and had to install a few gem dependencies. However, after installing the mysql gem I get the error, uninitialized constant MysqlCompat::MysqlRes, whenever I try to run a rake command that involves the mysql database. It seems I only get this error when I require the mms2r gem. Has anyone ...
Hi all, I just upgraded my Leopard system to Snow. I had a Rails application with a suite of Spec examples running before the upgrade; it used a mysql database. After the upgrade, running rake spec would fail like this: ... ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load rake aborted! closed strea...
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...
My tests fail when doing "rake test:functionals" but they pass consistently using autotest. The failing tests in question seems to be related to Authlogic not logging in the user properly when using rake. For facilitating signing in a user in tests, I have a test helper method as follows: class ActionController::TestCase def signin(...
How can I have the tests for my Rails app to be executed in a random order? Is there a simple solution using rake? ...
I am writing a web-based dev-console for Rails development. In one of my controller actions, I am calling Rake, but I am unable to capture any of the output that Rake generates. For example, here is some sample code, from the controller: require 'rake' require 'rake/rdoctask' require 'rake/testtask' require 'tasks/rails' require 'string...
I'm using rake to create a Table of contents from a bunch of static HTML files. The question is how do I insert it into all files from within rake? I have a <ul id="toc"> in each file to aim for. The entire content of that I want to replace. I was thinking about using Nokogiri or similar to parse the document and replace the DOM node...
Hey, Since I migrated to Snow Leopard I can't run any Rake command from the command line. e.g if I try to run rake stats I get: rake aborted! dlopen(/Users/xxx/.gem/ruby/1.8/gems/hpricot-0.8.1/lib/hpricot_scan.bundle, 9): no suitable image found. Did find: /Users/xxx/.gem/ruby/1.8/gems/hpricot-0.8.1/lib/hpricot_scan.bundle: no ma...
I have a rake task that uploads a list of files via ftp. Copying without threading works fine, but it would be faster if I could do multiple concurrent uploads. (I'm new to ruby and multithreading, so no surprise it didn't work right off the bat.) I have: files.each_slice(files.length / max_threads) do |file_set| threads << Thread....
Trying to implement a rating system of users and postings. What is the best schema for managing the multiple reputations. A user has a reputation derived from postings and feedback(similar to SO). Postings have a reputation too (again similar to SO). My initial idea as to have one reputation table. The rows would correspond to the...
I think I'm going mad. Can anyone help? I have the folder c:\project\bin I run the following to execute my rake script cd C:\project rake In my rake script I have: require 'rake/clean' CLOBBER.include('bin') task :default => ["compile"] task :compile do # do nothing end It doesn't delete the "bin" folder nor the contents of ...
I am running a command using sh and need to read the output of that command. e.g. sh "whoami" But sh only seems to return true rather than a string containing the output of the whoami command. Does anyone know of a solution? ...
Running Snow Leopard. Tried uninstalling, and re-installing. Still getting the same error whenever I run a rake task. mbpro:redmine shereef$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] mbpro:redmine shereef$ rails -v Rails 2.3.4 mbpro:redmine shereef$ which rails /usr/local/bin/rails mbpro:redmine shereef$ gem...
I'm on a .NET project, and I would like to migrate build script from MsBuild to Rake. I don't want to force developers (or build agent machines) to have to install anything, I want it to be self contained. If possible I'd prefer to use IronRuby. Is it possible to just drop everything in /tools/rake and /tools/IronRuby and have it just w...
Hi, Can I use helper methods in rake? Thanks. Sam ...
I'd like to set the file permissions for a copied file using a rake task. Is this possible? ...
I am using rake to build my project and I have a build.bat file similar to this: @echo off cls rake When I double click on build.bat the dos window pops up and shows all the progress but closes itself when the task is finished. Is there way to do a Console.ReadLine so that user can get a chance to see the log? Thanks. Updated: I've...
I've been learning Ruby recently, and I've not gotten into the dirty recesses of learning Rake yet. I've been playing around with NetBeans, and I made a little Ruby project with a file that simply prints "Hello, World!". I was looking at the Rakefile that NetBeans generates, and I noticed that it had commented out the s.executables line,...
Hi, today I just ran rake db:migrate... well, two things happened, first it reversed from version 2 to 0, so it smashed my user db (very very annoying) and now it wants to migrate vom version 1. But it should start at version 16. Any Ideas? Shema.rb is okay and right. ...