Git Product home page Git Product logo

Comments (6)

asok avatar asok commented on August 14, 2024

Hmm can you be more specific? You are running projectile-rails-rake and you are getting the error?

from projectile-rails.

semanticart avatar semanticart commented on August 14, 2024

@asok sorry I wasn't more clear.

Everything works as expected out of the box. No bugs. ✔️

C-c r ! r RET will run the default rake task. I'd like to bind that to something a little shorter that doesn't require a RET at the end (e.g. just s-t).

( I know how to do keybindings but the ARG part of the (projectile-rails-rake ARG) is tripping me up. )

from projectile-rails.

semanticart avatar semanticart commented on August 14, 2024

A little more info:

I guess the ARG part is probably just the universal arguments and not my actual problem.

(global-set-key (kbd "s-t") 'projectile-rails-rake)

Launches the projectile-rails-rake interactive task picker but I still have to manually hit RET to run the default task

the macro (global-set-key (kbd "s-t") (kbd "C-c r ! r")) tries to run the task "[No match]"

from projectile-rails.

asok avatar asok commented on August 14, 2024

@semanticart I'm not sure that (global-set-key (kbd "s-t") (kbd "C-c r ! r")) can work as you expect.
kbd returns a string, and global-set-key expects a symbol naming a command as the second argument.
But the main issue here is that I've implemented the code in the way that it is not possible to pass a name of a task to run.

Do you need to run the tests via rake? Or maybe you could use rspec-mode or ruby-test-mode?
Also you could try to do something like this:

(defun run-default-rake-task ()
  (interactive)
  (compile "rake" 'projectile-rails-compilation-mode))

(define-key projectile-rails-mode-map (kbd "s-t") 'run-default-rake-task)

from projectile-rails.

semanticart avatar semanticart commented on August 14, 2024

@asok thanks for the advice. The provided code works great.

I'll check out those other two modes as well. Cheers!

from projectile-rails.

asok avatar asok commented on August 14, 2024

@semanticart of course if you are using bundler or some pre-loader raplece "rake" with i.e. "bundle exec rake".

from projectile-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.