jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Teaspoon not working using CodeShip? #347

Closed somecodemonkey closed 9 years ago

somecodemonkey commented 9 years ago

I am pretty sure i am doing something wrong but not sure as to what yet.

I can run teaspoon fine locally using the cli bundle exec rake teaspoon. However when the specs attempt to run via CodeShip using the same command, it cannot seem to find my assets. I keep getting the error:

# route is in spec_helper.js
Error: ActionView::Template::Error: couldn't find file '../../app/assets/javascripts/blah/Blah'

Not sure if this is a codeship error or teaspoon either.

mikepack commented 9 years ago

What is the actual JavaScript file that can't be loaded (in place of blah/Blah)? Is it a teaspoon requirement or one of your app's requirements?

jejacks0n commented 9 years ago

My guess is that it's not in the precompile list?

mikepack commented 9 years ago

Going to close this. Will happily reopen if you can provide more insight into the actual file names.

somecodemonkey commented 9 years ago

Im sorry but why are the filenames relevant? I could name them blah/Blah.js the issue is still valid as long as the file exists.

I also have them in my pre compile list.

Rails.application.config.assets.precompile += %w( blah/Blah.js )

In my gemfile

group :development, :test do
  gem 'rspec-rails', '~> 2.0'
  gem 'factory_girl_rails'
  gem 'teaspoon', '~> 0.9.0'
  gem 'mocha'
  gem 'selenium-webdriver'
end
# commands ran on codeship
rvm use 2.1.1
bundle install
bundle exec rake db:migrate
bundle exec rake assets:precompile
export RAILS_ENV=test
bundle exec rake db:schema:load

bundle exec rake teaspoon

I also see Using teaspoon 0.9.1 when codeship ran bundle install.

mikepack commented 9 years ago

The file names are important so I can distinguish whether your setup is having trouble loading a teaspoon JS file or your application's JS file.

Can you paste the portion of your code that requires blah/Blah.js?

laserlemon commented 8 years ago

I'm having a similar problem and it seems to be due to the "sprockets" gem version. Locally, everything works with sprockets 2.12.4 but the build server has 3.5.2 installed. For me this can happen because Gemfile.lock is not checked in since I'm developing a gem so the build server fetches the latest version of sprockets that will satisfy the requirement.

I've confirmed that in my scenario, the jump from 2.12.4 (the last 2.x version) to 3.0.0 (the first 3.0 version) is enough to trigger the error.

jejacks0n commented 8 years ago

That's fixed in latest.


Jeremy Jackson

On Feb 12, 2016, at 7:24 AM, Steve Richert notifications@github.com wrote:

I'm having a similar problem and it seems to be due to the "sprockets" gem version. Locally, everything works with sprockets 2.12.4 but the build server has 3.5.2 installed. For me this can happen because Gemfile.lock is not checked in since I'm developing a gem so the build server fetches the latest version of sprockets that will satisfy the requirement.

I've confirmed that in my scenario, the jump from 2.12.4 (the last 2.x version) to 3.0.0 (the first 3.0 version) is enough to trigger the error.

— Reply to this email directly or view it on GitHub.

laserlemon commented 8 years ago

Latest what?

jejacks0n commented 8 years ago

Release of teaspoon perhaps? The repo you opened this issue on... :)


Jeremy Jackson

On Feb 12, 2016, at 9:14 AM, Steve Richert notifications@github.com wrote:

Latest what?

— Reply to this email directly or view it on GitHub.