ruby - How do I start redis as a rakefile task -


i trying create rakefile runs both redis , irb. have figured out how run irb (the first task runs), when try run redis task see error:

rake aborted! wrong number of arguments

exactly wrong? code below:

task :default   require 'irb'    irb.start end  task :init   require 'redis'   exec {'redis-server'} end 

command use run code:

bundle exec rake (or rake :init, depending on 1 want run)

you receiving argument error because exec expects string argument, , sending block. exec not block , wants string.

use exec "redis-server" execute command correctly.

hopefully result looking for. not sure why requiring redis @ since aren't using gem, executing command. behavior of task no different running redis-server on command line.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -