Search Results

Search found 540 results on 22 pages for 'rake'.

Page 3/22 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • rake test and test_structure.sql

    - by korinthe
    First of all, I have to run "rake RAILS_ENV=test ..." to get the test suites to hit my test DB. Annoying but ok to live with. However when I do so, I get a long stream of errors like so: > rake RAILS_ENV=test -I test test:units psql:/path/to/project/db/test_structure.sql:33: ERROR: function "armor" already exists with same argument types [and many more] It looks like some DB definitions are getting unnecessarily reloaded. I can't find any mention of this on Google, so I was wondering whether others have seen this? I am using a PostgreSQL database with the following in my environment.rb: config.active_record.schema_format = :sql and using Rails 2.3.5 with rake 0.8.7.

    Read the article

  • Automating rake doc:app

    - by jerhinesmith
    For you rails programmers, what's the easiest way to keep your RDoc files up-to-date? I know I can run rake doc:app manually, but I really don't feel like adding a manual step to the check-in process, and since we're already using cruisecontrolrb to handle deployment and testing automation, it seems like there should be an easy way to regenerate these files on check-in. Is anyone already automating rake doc:app? And, if so, what are your suggestions?

    Read the article

  • rake gems:refresh_specs error on unpacked gems

    - by Urf
    Following the great advice of Chris Wanstrath, I decided to vendor everything. However, whenever I run a rake task now I get an error for each of my unpacked gems stating config.gem: Unpacked gem gemname in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. I've done this but no dice. Anyone have the same issue? If so, how do I resolve? TIA

    Read the article

  • rake db:migrate not executing new migrations

    - by Matt H
    Hi guys. I'm trying to add some columns to an existing table, so I generated a migration that did so. When I run db:migrate the new migration isn't run and the table isn't updated. I've had this problem many times before, and it's getting bloody annoying. Output from rake db:migrate $ rake db:migrate --trace (in /Users/one/app) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump

    Read the article

  • Generate .sql files using rake task

    - by Prasanna
    Hi, I have a table called 'choices' in this table i am storing static data for my site like Blood Groups , qualification, job types etc., I have to create rake tasks one is for to create backup choices.sql file from choices table data, second one is dump the data from .sql file to choice table. How can I create the rake tasks. Any other best way to take backup data from a table and load data into the table Thanks

    Read the article

  • Repeated Rake Task Using Delayed Job

    - by bob
    Hello, I am currently using the delayed_job gem and I was wondering how to run a rake task every 5 minutes. I want to run "rake ts:reindex RAILS_ENV=production" every 5 minutes but I'm not sure where to start. I really don't have much more I can say about this because I am VERY inexperienced in this area of rails development.

    Read the article

  • Is there a "method_missing" for rake tasks?

    - by James Wenton
    If my Rakefile does not find a task with a particular name, I'd like rake to instead create a new task by that name according to certain rules, if a file with the missing task name exists. But if it doesn't, I want to fall back to the default ("Don't know how to build task 'foo'!"). In short, is there a method_missing for Rake?

    Read the article

  • rake db:migrate fails when trying to do inserts

    - by anthony
    I'm trying to get a database populate so I can begin working on a project. THis project is already built and I'm being brought in to helpwith front-end work. Problem is I can't get rake db:migrate to do any inserts. Every time I run rake db:migrate I get this: ... == 20081220084043 CreateTimeDimension: migrating ============================== -- create_table(:time_dimension) - 0.0870s INSERT time_dimension(time_key, year, month, day, day_of_week, weekend, quarter) VALUES(20080101, 2008, 1, 1, 'Tuesday', false, 1) rake aborted! Could not load driver (uninitialized constant Mysql::Driver) ... I'm building on a MBP with Snow Leopard. I've installed XCode from the disk that comes with the mac. I've updated ruby, installed rails and all the needed gems. I have the 64 bit version of MySQL installed. I've tried the 32 bit version of MySQL and I've even tried installing from macports (via http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition) The mysql gemis installed using: sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/path/to/mysql/bin/mysql_config the migrate creates the tables just fine but it dies every. single. time. it trys an insert. Any help would be great

    Read the article

  • OpenID Authentication using AuthLogic

    - by Steve
    Hi, I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered rake open_id_authentication:db:create --trace I get the following error (in /Users/felix/login) rake aborted! Don't know how to build task 'open_id_authentication:db:create' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19:in `<main>' Can someone tell what am i doing incorrectly Thanks

    Read the article

  • OpenID Authentication using AuthLogic Error

    - by Steve
    Hi, I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered rake open_id_authentication:db:create --trace I get the following error (in /Users/felix/login) rake aborted! Don't know how to build task 'open_id_authentication:db:create' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19:in `<main>' Can someone tell what am i doing incorrectly Thanks

    Read the article

  • Can a rake task know about the other tasks in the invocation chain?

    - by andrewdotnich
    Rake (like make) is able to have many targets/tasks specified on invocation. Is it possible for a rake task to access the list of tasks the user invoked, in order to do its job? Scenario: Consider a Rake-based build tool. A help task would like to know what tasks were also specified in order to print their usage and halt the build process. The benefit of this as opposed to rake-style parameter passing are cleaner syntax (rake help build instead of rake help task=build) and chaining (rake help build run_tests would print usage for both).

    Read the article

  • Problem with rake db:migrate

    - by Shreyas Satish
    When I try rake db:migrate, I get the following error: !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted! no such file to load -- mysql And when I try to "gem install mysql" Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb Can't find header files for ruby. Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection. I checked the rubygems folder and mysql gem has been installed. Any ideas? Cheers

    Read the article

  • render_to_string from a rake task

    - by Horace Loeb
    I want to use a Rake task to cache my sitemap so that requests for sitemap.xml won't take forever. Here's what I have so far: @posts = Post.all sitemap = render_to_string :template => 'sitemap/sitemap', :locals => {:posts => @posts}, :layout => false Rails.cache.write('sitemap', sitemap) But when I try to run this, I get an error: undefined local variable or method `headers' for #<Object:0x100177298> How can I render a template to a string from within Rake?

    Read the article

  • Passing Parameters to Child Tasks from a Parent Task in Rake

    - by Haseeb Khan
    I am new to the world of Rake and currently writing a Rake Script which consists of various tasks depending on the arguments passed to it on runtime. From some Tutorials over the web, I figured out how to pass parameters to the Script as well how to make a task which is dependent on other subtasks. For reference, I have mentioned a sample below: task :parent, [:parent_argument1, :parent_argument2, :parent_argument3] => [:child1, :child2] do # Perform Parent Task Functionalities end task :child1, [:child1_argument1, :child1_argument2] do |t, args| # Perform Child1 Task Functionalities end task :child2, [:child2_argument1, :child2_argument2] do |t, args| # Perform Child2 Task Functionalities end Following is what I want to achieve: I want to pass the arguments passed to the parent task to the child tasks. Is it allowed? Is there a way I can make the child tasks as private so they can't be called independently? Thanks in advance.

    Read the article

  • Shell Script Sequencing with Rake

    - by Haseeb Khan
    Hi All, I am working on a rake utility and want to implement something mentioned below: There are some shell commands in a sequence in my Rake file. What I want is that the sequence should wait for the previous command to finish processing before it moves to the next one. sh "git commit -m \"#{args.commit_message}\"" do |ok, res| # Do some processing end sh "git push heroku master" So, in the above example what I want is that sh "git push heroku master" shouldn't be executed until the processing in the sh "git commit -m \"#{args.commit_message}\"" do |ok, res| # Do some processing end is completed. Also another nice to have would be that if I can store the output of the shell command in a Ruby variable so it can be used in further manipulation if required. Looking forward to a reply from the fellow community member shortly. Thanks in advance.

    Read the article

  • rake task can't access rails.cache

    - by mark
    Hi I want to call a rake task from a cron job that stores remote weather data in the rails cache. However, I must be doing something pretty wrong here because I cannot find any solution through countless fruitless searches. Say I define and call this task namespace :weather do desc "Store weather from remote source to cache" task :cache do Rails.cache.write('weather_data', Date.today) end end I get the error Anonymous modules have no name to be referenced by Which leads me to believe the rails cache isn't available. Outputting Rails.class from the rake file gives me Module but Rails.cache.class again returns the above error. Do I need to include something here? Am I just hopeless at internet? :) Thanks in advance.

    Read the article

  • Using Routing helpers in a Rake task

    - by trobrock
    I have a rake task that sends out the next 'x' invitations to join a beta it uses this code: desc "This will send out the next batch of invites for the beta" task :send_invites => :environment do limit = ENV['limit'] c = 0 invitation = Invitation.all(:conditions => { :sent_at => nil, :sender_id => nil }, :limit => limit).each do |i| Mailer.deliver_invitation(i, register_url(i.token)) c.increment! end puts "Sent #{c} invitations." end I need to pass in the 'register_url' to the Mailer in order for the link to show up in the email, but since this is running from a rake task and not from a request it does not have a access to the helper methods. What is the best way of achieving this?

    Read the article

  • Create directory using rake in windows

    - by intern
    We were trying to run fllowing code in rake file: directory "tmp" file "hello.tmp" => "tmp" do sh "echo 'Hello' >> 'tmp/hello.tmp'" end We have taken this code from http://jasonseifer.com/2010/04/06/rake-tutorial But, since we are working on windows commands like'sh','echo' wont work.. according to the explanation given for the above code, it should first create a directory 'tmp' and then create a file 'hello.tmp' which will have 'hello' as its text.. Firstly, how can we do this for windows? and Secondly, a file with extension '.tmp' sounds quite wierd.. what does 'hello.tmp' specifies? Does it simply mean that 'hello.tmp' is a text file in 'tmp' directory?

    Read the article

  • rake tast can't access rails.cache

    - by mark
    Hi I want to call a rake task from a cron job that stores remote weather data in the rails cache. However, I must be doing something pretty wrong here because I cannot find any solution through countless fruitless searches. Say I define and call this task namespace :weather do desc "Store weather from remote source to cache" task :cache do Rails.cache.write('weather_data', Date.today) end end I get the error Anonymous modules have no name to be referenced by Which leads me to believe the rails cache isn't available. Outputting Rails.class from the rake file gives me Module but Rails.cache.class again returns the above error. Do I need to include something here? Am I just hopeless at internet? :) Thanks in advance.

    Read the article

  • Error creating Rails DB using rake db:create

    - by Simon
    Hi- I'm attempting to get my first "hello world" rails example going using the rails' getting started guide on my OSX 10.6.3 box. When I go to execute the first rake db:create command (I'm using mysql) I get: simon@/Users/simon/source/rails/blog/config: rake db:create (in /Users/simon/source/rails/blog) Couldn't create database for {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"blog_development", "pool"=>5, "password"=>nil, "socket"=>"/opt/local/var/run/mysql5/mysqld.sock"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) I found plenty of stackoverflow questions addressing this problem with the following advice: Verify that user and password are correct (I'm running w/ no password for root on my dev box) Verify that the socket is correct - I can cat the socket, so I assume it's correct Verify that the user can create a DB (As you can see root can connect and create a this DB no problem) simon@/Users/simon/source/rails/blog/config: mysql -uroot -hlocalhost Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 Server version: 5.1.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql create database blog_development; Query OK, 1 row affected (0.00 sec) Any idea on what might be going on here?

    Read the article

  • Avoiding duplication in setting properties on the task in Rake tasks

    - by Stray
    I have a bunch of rake building tasks. They each have unique input / output properties, but the majority of the properties I set on the tasks are the same each time. Currently I'm doing that via simple repetition like this: task :buildThisModule => "bin/modules/thisModule.swf" mxmlc "bin/modules/thisModule.swf" do |t| t.input = "src/project/modules/ThisModule.as" t.prop1 = value1 t.prop2 = value2 ... (And many more property=value sets that are the same in each task) end task :buildThatModule => "bin/modules/thatModule.swf" mxmlc "bin/modules/thatModule.swf" do |t| t.input = "src/project/modules/ThatModule.as" t.prop1 = value1 t.prop2 = value2 ... (And many more property=value sets that are the same in each task) end In my usual programming headspace I'd expect to be able to break out the population of the recurring task properties to a re-usable function. Is there a rake analogy for this? Some way I can have a single function where the shared properties are set on any task? Something equivalent to: task :buildThisModule => "bin/modules/thisModule.swf" mxmlc "bin/modules/thisModule.swf" do |t| addCommonTaskParameters(t) t.input = "src/project/modules/ThisModule.as" end task :buildThatModule => "bin/modules/thatModule.swf" mxmlc "bin/modules/thatModule.swf" do |t| addCommonTaskParameters(t) t.input = "src/project/modules/ThatModule.as" end Thanks.

    Read the article

  • Help w/ Sluggish "rake cucumber"

    - by Eric M.
    I've been trying to debug some super slow performance in running my cucumber features. I've run various calls through ruby-prof and think I see the bottlenecks (not too familiar with using ruby-prof) but do not know the cause or more important the solution. I've include below the output from running rake cucumber. http://dl.dropbox.com/u/1788885/rake_cucumber.txt Does anyone have any idea why this is happening or how I could go about debugging it further? Thanks, Eric

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >