Code Monkey home page Code Monkey logo

Comments (2)

piotrmurach avatar piotrmurach commented on May 28, 2024

Hi Matti,

Thanks for using tty and reporting this.

In my experience, you get this behaviour due to git not tracking the files in newly generated project. Adding exe directory to staged files makes git aware of the folder, meaning, gemspec can locate the executable and your specs should run fine. In near future, I will improve this experience by stoping to rely on git for loading files. Trust me I want to provide a very good experience out of the gate. For now I'm creating a roadmap of how tty v1.0 may look like.

from tty.

slowbro avatar slowbro commented on May 28, 2024

For me, even having git added and even committed, I get the same error:

  1) `test-app test` command executes `test-app help test` command successfully
     Failure/Error: output = `test-app help test`
     
     Errno::ENOENT:
       No such file or directory - test-app
     # ./spec/integration/test_spec.rb:3:in ``'
     # ./spec/integration/test_spec.rb:3:in `block (2 levels) in <top (required)>'

To me, it seems like a PATH issue. If I were to install the gem, it would probably work - but that means it could possibly be testing against a different version of my app, and not the code itself.

However, while looking more into this, I realized that I probably missed a step somewhere. When trying to execute the app with bundle exec test-app, I got:

[katelyn@h test-app]$ bundler exec test-app
Traceback (most recent call last):
	2: from /home/katelyn/.rvm/rubies/ruby-2.6.5/bin/bundler:23:in `<main>'
	1: from /home/katelyn/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
/home/katelyn/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/katelyn/code/test-app/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`

Then:

[katelyn@h test-app]$ bundler exec test-app
bundler: command not found: test-app
Install missing gem executables with `bundle install`

Once I did a bundle-install, the integration test passed, since test-app was now found by bundler. As someone who has not used bundler before, I wasn't aware of the pre-requisites so likely that is how I ended up with this. Is there some way to have bundler look around in the base project dir even if bundler install has not been ran, or is that an anti-pattern for bundler?

from tty.

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.