Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jruby-9000 to testing matrix #288

Merged
merged 1 commit into from
Nov 19, 2015
Merged

Add jruby-9000 to testing matrix #288

merged 1 commit into from
Nov 19, 2015

Conversation

seanpdoyle
Copy link
Contributor

Closes #241.

No longer redirects STDERR to STDOUT via the STDOUT file
descriptor (as described in the Kernel#spawn documentation).

Related to jruby/jruby#3038.

Uses poltergeist instead of capybara-webkit.

Unfortunately, testing for jruby support is impossible until
thoughtbot/capybara-webkit#725 is resolved.

@seanpdoyle
Copy link
Contributor Author

@softwareanimal could you please pull this branch down and try it out? I can't seem to get CI working with JRuby 9000 (this project uses required keyword arguments, so I assume other versions won't work).

@seanpdoyle
Copy link
Contributor Author

Unfortunately, Travis explicitly disables C extensions for JRuby:

http://docs.travis-ci.com/user/languages/ruby/#JRuby%3A-C-extensions-support-is-disabled

This makes installing capybara-webkit impossible

@nadavshatz
Copy link

I just ran it with JRuby-9.0.4.0 and it built it but it then fails on the helper:

ActionView::Template::Error (No such file or directory - /Users/nadav/Documents/Code/TYN/tailor/tmp/ember-cli-fe80f212-9b83-463c-8267-6134851680a6/apps/frontend/index.html):
    1: <%= render_ember_app @app do |head| %>
    2:   <% head.append do %>
    3:     <%= csrf_meta_tags %>
    4:   <% end %>
  org/jruby/RubyIO.java:3591:in `read'
  /Users/nadav/.rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/bundler/gems/ember-cli-rails-85b2e856b8dd/lib/ember_cli/sprockets.rb:18:in `index_html'
  /Users/nadav/.rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/bundler/gems/ember-cli-rails-85b2e856b8dd/app/helpers/ember_rails_helper.rb:19:in `render_ember_app'
  /Users/nadav/.rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/bundler/gems/ember-cli-rails-85b2e856b8dd/app/views/ember_cli/ember/index.html.erb:1:in `___sers_nadav__rbenv_versions_jruby_________lib_ruby_gems_shared_bundler_gems_ember_cli_rails___b_e___b_dd_app_views_ember_cli_ember_index_html_erb__767059146_15426'

That's after it built it fine.

also:

$ cat /Users/nadav/Documents/Code/TYN/tailor/tmp/ember-cli-fe80f212-9b83-463c-8267-6134851680a6/apps/frontend/index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Frontend</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <base href="/" />

    <link rel="stylesheet" href="/assets/frontend/assets/vendor.css">
    <link rel="stylesheet" href="/assets/frontend/assets/frontend.css">


  </head>
  <body>


    <script src="/assets/frontend/assets/vendor.js"></script>
    <script src="/assets/frontend/assets/frontend.js"></script>


  </body>
</html>

@seanpdoyle
Copy link
Contributor Author

I think that is a new issue stemming from the latest ember-cli and ember-cli-sri.

Could you try adding the following to your ember-cli-build.js (as a temporary fix):

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    SRI: { enabled: false }
    // ...
  });
};

@nadavshatz
Copy link

I did it and got the same error.

@seanpdoyle
Copy link
Contributor Author

Might be caused by jonathanKingston/broccoli-sri-hash#10?

@seanpdoyle
Copy link
Contributor Author

@nadavshatz what version of ember-cli are you running?

@nadavshatz
Copy link

$ ember version
version: 1.13.12
node: 4.2.2
npm: 2.14.10
os: darwin x64

@seanpdoyle
Copy link
Contributor Author

@nadavshatz EmberCLI 1.13.13 was released today with a fix for that ember-cli-sri bug that we might've been running into.

Would you mind updating your CLI and trying this again?

Closes [#241].

No longer redirects `STDERR` to `STDOUT` via the `STDOUT` file
descriptor (as described in the [`Kernel#spawn`][spawn] documentation).

Related to [jruby/jruby#3038].

Uses `poltergeist` instead of `capybara-webkit`.

Unfortunately, testing for `jruby` support is impossible until
[thoughtbot/capybara-webkit#725][#725] is resolved.

[#241]: #241
[spawn]: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-spawn
[jruby/jruby#3038]: jruby/jruby#3038
[#725]: thoughtbot/capybara-webkit#725
@nadavshatz
Copy link

I'm still getting the same error even with 0.5.3

@seanpdoyle
Copy link
Contributor Author

@nadavshatz what version of https://github.com/rondale-sc/ember-cli-rails-addon/ are you on?

@nadavshatz
Copy link

@seanpdoyle 0.5.1

@seanpdoyle
Copy link
Contributor Author

@nadavshatz which application server are you using?

https://github.com/thoughtbot/ember-cli-rails#serving-from-multi-process-servers-in-development

If you're using a forking server, how many threads and workers do you have?

@nadavshatz
Copy link

@seanpdoyle I tried.

I'm using Puma indeed. It was defaulting to 0-16 threads with a single worker.

I ran it manually with 1 thread and a single worker.

* Version 2.15.3 (jruby 2.2.2), codename: Autumn Arbor Airbrush
* Min threads: 1, max threads: 1

Still got the same error:
No such file or directory - /Users/nadav/Documents/Code/TYN/tailor/tmp/ember-cli-4baa6841-16fa-4558-985d-5f5a452ef303/apps/frontend/index.html

@seanpdoyle
Copy link
Contributor Author

@nadavshatz would you be able to distill the problem are to a small sample app that I could clone and debug?

@seanpdoyle
Copy link
Contributor Author

@nadavshatz here's a Puma config for a working app that consumes EmberCLI-Rails:

# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#config

workers Integer(ENV["WEB_CONCURRENCY"] || 2)
threads_count = Integer(ENV["MAX_THREADS"] || 5)
threads threads_count, threads_count

preload_app!

rackup DefaultRackup
port ENV["PORT"] || 3000
environment ENV["RACK_ENV"] || "development"

on_worker_boot do
  # Worker specific setup for Rails 4.1+
  # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
  ActiveRecord::Base.establish_connection
end

With the following ENV:

WEB_CONCURRENCY=1
MAX_THREADS=1

@nadavshatz
Copy link

I created a clean small project and it worked fine in it. :\ so I'm not sure what is the problem.
The thing is - It does build it and the file is there which makes it really difficult.
I might try using my own controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants