Closed kentoj closed 10 years ago
I do t think that's the Spring Boot CLI. Looks like you have a "spring" executable from a ruby gem in your PATH.
Spring boot is Java and shell not Ruby.
ok, thanks for the heads up dsyer. Do you know how I would access the spring CLI without uninstalling ruby?
Find out where the CLI is installed and call it SPRING_HOME, then
$ export PATH=$SPRING_HOME/bin/:$PATH
You don't have to uninstall ruby to get rid of that gem though. Just "gem uninstall spring". Or switch to a clean ruby environment using rbenv (which I can see you are using).
Thanks for the help @dsyer! Everything is working fine now.
spring is a gem used by Ruby on Rails framework as of version 4.1 (http://guides.rubyonrails.org/4_1_release_notes.html) and it just happens to also use an executable called 'spring'. It's pretty funny how the first commit to this spring gem is about 2 months after the first commit to spring-boot project
https://github.com/rails/spring/commit/a035f47a4f1c930cbc452eb87aeabaab409a0e64
Unfortunate coincidence? :8ball:
Coincidence indeed. I guess Rails users have to alias "spring" to "springboot" or something.
As mentioned by @dsyer , here's steps to execute on your shell (on mac)
gem uninstall spring
cd /usr/local/bin
sudo ln -sf ../Cellar/springboot/*.RELEASE/bin/spring .
Don't need to uninstall anything...
cd /usr/local/bin
sudo ln -sf ../Cellar/springboot/*.RELEASE/bin/spring ./springboot
Then just call springboot init
or whatever
Thanks @dsmithco !
@dsmithco Worked for me. Thank you.
In the "JAR support and Groovy support" section after installing the Spring Boot CLI with Homebrew on Mac OS X Mavericks I get a "no Gemfile present" error when running app.groovy with the "spring run app.groovy" command.
The error I get is:
groovy(master) > spring run app.groovy /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:46:in'
find_project_root': Spring was unable to locate the root of your project. There was no Gemfile present in the current directory (/Users/kent/git/public/spring-projects/koj-gs-spring-boot/src/main/groovy) or any of the parent directories. (Spring::UnknownProject) from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:in
find_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:infind_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:in
find_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:infind_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:in
find_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:infind_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:in
find_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:infind_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:48:in
find_project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/configuration.rb:37:inproject_root_path' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/env.rb:27:in
project_root' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/env.rb:41:inapplication_id' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/env.rb:53:in
pidfile_path' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/env.rb:68:inserver_running?' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/run.rb:24:in
call' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:incall' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client.rb:26:in
run' from /Users/kent/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/bin/spring:48:in<top (required)>' from /Users/kent/.rbenv/versions/2.1.2/bin/spring:23:in
load' from /Users/kent/.rbenv/versions/2.1.2/bin/spring:23:in `