Closed unixc3t closed 7 years ago
Are you sure this is not an error connected with your setup? Maybe something in your .bashrc
?
Could you also enable debug on error with M-x toggle-debug-on-error RET
and run again. You should get a backtrace. Please paste it here.
@asok
-- mode: projectile-rails-compilation; default-directory: "~/projects/blog/" -- Projectile Rails Compilation started at Mon Dec 19 20:43:30
bundle exec rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (12.0.0) has removed it. You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install. (Bundler::GemNotFound)
/bin/bash: -c: line 0: syntax error near unexpected token (' /bin/bash: -c: line 0:
bundle exec rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (12.0.0) has removed it. You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install. (Bundler::GemNotFound)'
Projectile Rails Compilation exited abnormally with code 1 at Mon Dec 19 20:43:30
this is my gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.6' gem 'rake','12.0.0' gem 'sqlite3' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.1.0' gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc gem 'awesome_rails_console'
group :development, :test do gem 'byebug' end
group :development do gem 'web-console', '~> 2.0' gem 'spring' end
rudy@rudy ~/projects/blog $ gem list | grep rake rake (12.0.0)
rudy@rudy ~/projects/blog $ whereis rake rake: /usr/bin/rake /usr/local/bin/rake /home/rudy/.rbenv/shims/rake
rudy@rudy ~/projects/blog $ ls -al /usr/bin/rake lrwxrwxrwx 1 root root 28 Dec 19 20:37 /usr/bin/rake -> /home/rudy/.rbenv/shims/rake rudy@rudy ~/projects/blog $ ls -al /usr/local/bin/rake lrwxrwxrwx 1 root root 28 Dec 18 17:08 /usr/local/bin/rake -> /home/rudy/.rbenv/shims/rake
this is my .bashrc
` case $- in i) ;; *) return;; esac
HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE=1000 HISTFILESIZE=2000
shopt -s checkwinsize
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi
case "$TERM" in xterm|xterm-color|*-256color) color_prompt=yes;; esac
if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then if [[ ${EUID} == 0 ]] ; then PS1='${debian_chroot:+($debian_chroot)}[\033[01;31m]\h[\033[01;34m] \W \$[\033[00m] ' else PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m] [\033[01;34m]\w \$[\033[00m] ' fi else PS1='${debian_chroot:+($debian_chroot)}\u@\h \w \$ ' fi unset color_prompt force_color_prompt
case "$TERM" in xterm|rxvt) PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h \w\a]$PS1" ;; *) ;; esac
if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' alias hp="http_proxy=http://localhost:8123"
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi
if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi
if [ -x /usr/bin/mint-fortune ]; then /usr/bin/mint-fortune fi
export GRADLE_HOME=/home/rudy/pro/sdkman/gradle export GRADLE_BIN=$GRADLE_HOME/bin
export MAVEN_HOME=/home/rudy/pro/sdkman/maven export MAVEN_BIN=$MAVEN_HOME/bin
export ANT_HOME=/home/rudy/pro/sdkman/ant export ANT_BIN=$ANT_HOME/bin
export JAVA_HOME=/home/rudy/pro/sdkman/jdk1.8.0_112 export JAVA_BIN=$JAVA_HOME/bin
export KOTLIN_HOME=/home/rudy/pro/sdkman/kotlinc export KOTLIN_BIN=$KOTLIN_HOME/bin
export PATH="$JAVA_HOME:$JAVA_BIN:$KOTLIN_HOME:$KOTLIN_BIN:$GRADLE_BIN:$MAVEN_BIN:$ANT_BIN:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)"
export NVM_DIR="/home/rudy/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
export SDKMAN_DIR="/home/rudy/.sdkman" [[ -s "/home/rudy/.sdkman/bin/sdkman-init.sh" ]] && source "/home/rudy/.sdkman/bin/sdkman-init.sh" `
If you run rake
in this project do you got the error? Is it the only project you have this error? Can you publish this repo so I can re-create the error?
@asok If I run rake in this project in terminal , rake is ok if i use emacs and run C-c r ! r , the Error appear
this is the project repo
https://github.com/unixc3t/TempBlog
@unixc3t I've cloned your repo and it works without problem. I would suggests that you load something to your shell environment when you start Emacs.
Maybe you could run Emacs with -Q
switch. And in the scratch buffer paste and evaluate this:
(require 'package)
;; Add MELPA before initialization
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'projectile-rails)
(projectile-rails-global-mode)
Now you could try testing running the rake command via C-c r ! r.
@asok thank you very much . I will try it.
my env linux mint 64bit emacs 24.5.1
the system default bash
when i use C-c r ! r
the error is /bin/bash: -c: line 0: syntax error near unexpected token `('