Thursday, 15 May 2014

grails emacs mode - "Cannot open load file" "project-mode" -



grails emacs mode - "Cannot open load file" "project-mode" -

i trying utilize emacs grails development. tried on grails-emacs-mode

there emacs , emacs23 on ubuntu 12.04.

prayag@prayag:~$ ls -l /usr/share/emacs[tab][tab] emacs/ emacs23/

as grails-emacs-mode suggests, copied grails-mode.el , primary.org files emacs23/site-list

prayag@prayag:~$ ls -l /usr/share/emacs23/site-lisp/ total 32 -rw-r--r-- 1 root root 3013 nov 17 00:39 debian-startup.elc drwxr-xr-x 2 root root 4096 nov 17 00:39 dictionaries-common -rw-r--r-- 1 root root 18205 feb 14 01:11 grails-mode.el -rw-r--r-- 1 root root 0 feb 14 01:11 primary.org -rw-r--r-- 1 root root 106 sep 22 01:16 subdirs.el

then, created init.el within .emacs.d there exists no .emacs file in home directory. init.el conatains

(require 'grails-mode) (setq grails-mode t) (setq project-mode t) (add-to-list 'auto-mode-alist '("\.gsp$" . nxml-mode)) ; utilize whatever mode want views. (project-load-all) ; loads saved projects. recommended, not required.

now, opening emacs23 doesn't show grails in menubar.

i tried

m-x load-file .emacs.d/init.el

which throws

warning (initialization): error occurred while loading `/home/prayag/.emacs.d/init.el': file error: cannot open load file, project-mode ensure normal operation, should investigate , remove cause of error in initialization file. start emacs `--debug-init' alternative view finish error backtrace.

on starting emacs23 --debug-init, next error thrown.

debugger entered--lisp error: (file-error "cannot open load file" "project-mode") require(project-mode) eval-buffer(#<buffer *load*<2>> nil "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t) ; reading @ buffer position 422 load-with-code-conversion("/usr/share/emacs/23.3/site-lisp/grails-mode.el" "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t) require(grails-mode) eval-buffer(#<buffer *load*> nil "/home/prayag/.emacs.d/init.el" nil t) ; reading @ buffer position 23 load-with-code-conversion("/home/prayag/.emacs.d/init.el" "/home/prayag/.emacs.d/init.el" t t) load("/home/prayag/.emacs.d/init" t t) #[nil "\205\264

grails-mode requires project-mode mentioned on emacs-grails-mode page. so, you'll need install project-mode.

also grab remaining groovy packages(all grails-mode) here.

emacs-grails-mode-ext modest contribution grails-mode allowing run grails commands straight emacs. given project(project-mode), can run grails commands such create-domain-class, create-service, etc.

i utilize function ido-find-file-in-tag-files here, bind c-x c-m-f .

simple guide emacs-grails-mode:

create project command line or eshell -> grails create-app yourapp using dired, go grails project folder m-x project-new -> create new project(project-mode) m-x project-save -> save project m-x project-load-and-select -> project-name argument there's grails menu if utilize menubar

you utilize my current emacs setup here, if have emacs24 installed. believe it's available ubuntu 12.04, i'm not sure. build emacs source on osx or utilize emacs-snapshot in ubuntu.

hope helps.

grails emacs elisp

No comments:

Post a Comment