Все вопросы: [rake]

123 вопросов

похожие теги: rake-taskrake-testrake-pipeline
12
голосов
3ответов
1155 просмотров

Loading message and test results appears after running rake task in Rails application

The following output appears after running some rake tasks: Loaded suite /usr/bin/rake Started Finished in 0.00042 seconds. 0 tests, 0 assertions, 0 failures, 0 errors This output is not useful or necessary for tasks not related to testing. I'd like to prevent it from appearing. I would assu...

23
голосов
1ответов
8235 просмотров

Specifying that a task has multiple dependencies

I would like to specify that: :output_core depends on :build_core :build_extension depends on :build_core :output_extension depends on both :build_extension and :output_core. How would I specify that last one? That in order to run the :output_extensions task, both :build_extensions and :outp...

132
голосов
12ответов
70215 просмотров

How to run a single test from a rails test suite?

How can I run a single test from a rails test suite? rake test ANYTHING seems to not help.

13
голосов
3ответов
23724 просмотров

How do I uninstall a Ruby on Rails application?

I've just worked through the Rail example supplied by Apple: http://developer.apple.com/Tools/developonrailsleopard.html Now that I'm done, I'd like to clean this up and remove the web service, database etc. Obviously I still want the RoR stack in place. How? Can I do this using rake?

1
голосов
3ответов
724 просмотров

Rails Rake task errors out while console equivalent does not

I have a piece of code that works fine in the console, but in a cron-driven rake task, it errors out every time, saying that the accessor function for one of the has_many relationships is not a valid method. Example: provider has_many instances, so I'm calling provider.instances, and the rake ta...

0
голосов
1ответов
234 просмотров

Rails: rake db:migrate suddenly starts at version 0 again, should start at version 16

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.

1
голосов
2ответов
1731 просмотров

How do you generate executables within a gem with Rake?

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...

73
голосов
6ответов
191140 просмотров

how to do "press enter to exit" in batch

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 chanc...

0
голосов
1ответов
454 просмотров

Setting file permissions using Rake

I'd like to set the file permissions for a copied file using a rake task. Is this possible?

48
голосов
2ответов
19729 просмотров

How do I use helpers in rake?

Can I use helper methods in rake?

2
голосов
3ответов
685 просмотров

Bin deploy rake (and IronRuby)

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/r...

7
голосов
7ответов
7523 просмотров

Missing the Rails 2.3.4 gem. Even though it's installed!

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$ w...

18
голосов
3ответов
8548 просмотров

How can I retrieve the output of my command when using rake sh?

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?

3
голосов
3ответов
3806 просмотров

Rake CLEAN/CLOBBER not deleting

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 ...

1
голосов
1ответов
121 просмотров

manage multiple reputation in database & code

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 reputati...

1
голосов
2ответов
1429 просмотров

Ruby Threads (Rake) for FTP

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_thr...

0
голосов
1ответов
984 просмотров

Can't run Rake commands any more, hpricot_scan.bundle no suitable image found

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-...

2
голосов
3ответов
1298 просмотров

How to use rake to insert/replace html section in each file?

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 simila...

8
голосов
4ответов
6452 просмотров

How can I capture Rake output when invoked from with a Ruby script?

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/testt...

8
голосов
2ответов
1289 просмотров

Ruby - Executing tests in a random order with rake

How can I have the tests for my Rails app to be executed in a random order? Is there a simple solution using rake?

2
голосов
3ответов
800 просмотров

Tests pass using "autotest" but not "rake test" using Authlogic

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: clas...

214
голосов
5ответов
93781 просмотров

How to pass arguments into a Rake task with environment in Rails?

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 "Te...

0
голосов
1ответов
580 просмотров

rake aborted! closed stream after upgrading to Snow Leopard

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:sche...

22
голосов
25ответов
26060 просмотров

uninitialized constant MysqlCompat::MysqlRes (using mms2r gem)

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 whe...

94
голосов
11ответов
67930 просмотров

Rake just one migration

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.

22
голосов
4ответов
10873 просмотров

db:schema:load vs db:migrate with capistrano

I have a rails app that I'm moving to another server and I figure I should use db:schema:load to create the mysql database because it's recommended. My problem is that I'm using capistrano to deploy and it seems to be defaulting to rake db:migrate instead. Is there a way to change this or is cap...

20
голосов
6ответов
9789 просмотров

What is the standard way to dump db to yml fixtures in rails?

I've seen some plugins and custom rake tasks to dump the active db to fixtures, but I'm not sure what the prevailing technique is. Basically, I want the opposite of rake:db:fixtures:load so that I can put basic db information (the admin user account, for one) into svn for when we deploy. I don't...

0
голосов
2ответов
454 просмотров

How would I invoke a rake script inside my rails application?

I want to execute a rake script from within a model. Beside calling it via backtick, is there anyway to include the rake library and call Rake::Task['some_task'].invoke.

0
голосов
1ответов
322 просмотров

Rails: gettext pot generation task generates empty files

my problem is that in my app I want to generate the gettext .pot file with rake but I'm getting a file with no keys, only the header text ("Some descriptive title. Copyright (C)..."). I'm using the task gettext:find getttext_18n_rails. I tried before with the classic updatepo task but was the s...

0
голосов
3ответов
3472 просмотров

Ruby on rails: Rake Migrate Help

I'm trying to do a rake migrate, but I'm getting an error when I do this: rake db:migrate What I get back: rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile' (See full trace...