Comments (12)
Would you mind posting the line from your Gemfile? If the git source is local, you should use an absolute path rather than a relative path. The listener executes code (bundle install) from within /tmp.
from specjour.
gem "rack-ssl-enforcer",
:require => "rack/ssl-enforcer",
:git => "git://github.com/pelle/rack-ssl-enforcer.git"
from specjour.
I just tried including the above line into my Gemfile, and the gem installed without issue. I double checked the installation by cd'ing into /tmp/<project_name> and running bundle list
. Did you bundle install
before running the specjour command? Bundle exec doesn't work if gems are missing.
from specjour.
I did bundle install. That's why it's so weird. The bundle install beforehand on the command line works fine, but the one as part of the specjour before_fork doesn't.
Wait, could that be it? If I bundle as part of the after_fork, would that help?
On Aug 30, 2011, at 3:45 AM, [email protected] wrote:
I just tried including the above line into my Gemfile, and the gem installed without issue. I double checked the installation by cd'ing into /tmp/<project_name> and running
bundle list
. Did youbundle install
before running the specjour command? Bundle exec doesn't work if gems are missing.Reply to this email directly or view it on GitHub:
https://github.com/sandro/specjour/issues/27#issuecomment-1939952
from specjour.
No, that didn't seem to help anything. I just get the bundle error twice now.
from specjour.
For reference, this is my .specjour/hooks.rb file:
Specjour::Configuration.before_fork = lambda do
system('bundle install')
end
And the error happens if I run the listener with bundle exec specjour listen
, then start a normal specjour test run. If I make a gemset and run it without the bundle exec it works better, but that will create maintenance headaches when gems inevitably update later.
from specjour.
Do you get the same error when you cd into /tmp/project and run bundle install
?
from specjour.
No, I don't get the error. If I try system("cd /tmp/project && bundle install")
in my hook I do still get the error.
from specjour.
So, I was thinking about this earlier, and I hit upon the idea that this might not be the right approach to this in the first place. If I have a project that has a Gemfile, what is the expected way for specjour to execute those specs? If the listener is run via bundle exec
the versions of the gems won't change unless the listener is restarted. But the specs don't run without it because of gem version conflicts.
Am I just thinking about the problem wrong? What is the expected usage of specjour for this problem?
from specjour.
You need to have all of your gem dependencies satisfied in order to run specjour listen
. Once the listener is up and running, it calls the before_fork callback before forking out worker processes to run tests. The default behavior of before_fork is to run bundle install within the project directory inside of /tmp. The listener doesn't need to know about updated gems because it never loads the rails environment. It simply prepares the project directory before forking workers.
I don't know why bundle install is failing for you. You could try removing .specjour/hooks as it seems redundant, and is the only difference between what you're doing and what I'm doing.
from specjour.
It appears as though the blame is lying more on bundler, since it won't cache a rack gem... but I can't seem to find out why it only looks in the cache to begin with, and doesn't behave like a normal bundle install
does. Removing the hooks doesn't help any.
from specjour.
@jyurek Did you find a solution to your issue?
from specjour.
Related Issues (20)
- 0.5.3 won't run with thor-0.15.2 HOT 1
- 0.5.3 prepares but won't run with rspec 2.10.0 HOT 5
- Specjour doesn't work with latest cucumber version HOT 2
- Seems to be incompatible with rspec-core 2.10.1 (fine with 2.10.0) HOT 12
- undefined method `step_mother' for Cucumber::Cli::Main:Class HOT 1
- Using specjour with Rails 3.2 HOT 2
- Rspec 2.11 config issue HOT 10
- Rspec-core current dev > 2.11.1 HOT 5
- cucumber or akephalos error? HOT 2
- Run with cucumber issue HOT 1
- rsync error - should specjour lisrten quit? HOT 2
- Specjour slow when before(:all) is heavily used HOT 7
- Worker tiemout feature? HOT 3
- Not playing well with rspec-core 2.11.1 HOT 3
- Is this project still in development? HOT 7
- Rails 4 compatibility HOT 2
- DNSSD error HOT 2
- Specjour does not work with cucumber version >= 1.2.2 HOT 1
- RSpec 3 - backtrace_clean_patterns HOT 1
- Is this project still alive?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specjour.