Bug #2683
closednightly build is missing jquery.ui.autocomplete
Description
Running foreman 9999+debian1~nightlybuild1371660936 on a current wheezy, I get the following error:
Sprockets::FileNotFound: couldn't find file 'jquery.ui.autocomplete' (in /usr/share/foreman/app/assets/stylesheets/application.scss:2) /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:102:in `resolve'
PS: having to suck the error message from the chromium inspector from some obscure CSS part was not easy.
Updated by David Schmitt over 11 years ago
hmm .. installing foreman-assets fixed that.
Seems like a missing dependency in the packaging for something.
Is it really useful to have a separate package for just a single file?!
Updated by Dominic Cleal over 11 years ago
What's meant to happen is that these assets get precompiled during the package build stage into the final foreman package, it's possible that step failed. foreman-assets is then only needed if you need to recompile them for some reason on the end system, maybe if you were developing or changing them.
Updated by David Schmitt over 11 years ago
Ah, thanks for the explanation. I've now checked in the foreman log too, but that has only more of the same:
Started GET "/assets/application-9d9caa48ce64dff7b8258f8fa8de0200.css" for 84.113.55.190 at 2013-06-19 20:18:51 +0200 Error compiling asset application.css: Sprockets::FileNotFound: couldn't find file 'jquery.ui.autocomplete' (in /usr/share/foreman/app/assets/stylesheets/application.scss:2) Served asset /application-9d9caa48ce64dff7b8258f8fa8de0200.css - 500 Internal Server Error Started GET "/assets/application-a8dd117506a8acb01de38d37138763ce.js" for 84.113.55.190 at 2013-06-19 20:18:51 +0200 Error compiling asset application.js: Sprockets::FileNotFound: couldn't find file 'jquery' (in /usr/share/foreman/app/assets/javascripts/application.js:1) Served asset /application-a8dd117506a8acb01de38d37138763ce.js - 500 Internal Server Error
Updated by Greg Sutcliffe over 11 years ago
- Status changed from New to Assigned
- Assignee set to Greg Sutcliffe
- Priority changed from Normal to High
I'll double check this later on today.
Updated by Greg Sutcliffe over 11 years ago
David, any particular page/action you were doing to generate that? A solid way to reproduce will save me time this afternoon ;)
Updated by David Schmitt over 11 years ago
I had a working foreman with an older nightly build (approx 1-2 weeks old) and upgraded to the current nightly using "aptitude full-upgrade". Reloading the login screen brought the quoted error messages. Installing foreman-assets fixed it.
The nightly does not contain files with "jquery.ui.auto" in the name.
Updated by Greg Sutcliffe over 11 years ago
I'm not seeing this on a fresh wheezy nightly install. This was just foreman+foreman-sqlite3 running in webrick:
Started GET "/dashboard" for 172.20.10.110 at 2013-06-20 14:43:14 +0000 Processing by DashboardController#index as HTML Session for Admin User is expired. Redirected to http://172.20.10.172:3000/users/login Filter chain halted as :session_expiry rendered or redirected Completed 302 Found in 120ms (ActiveRecord: 111.4ms) Started GET "/users/login" for 172.20.10.110 at 2013-06-20 14:43:14 +0000 Processing by UsersController#login as HTML Rendered users/login.html.erb within layouts/application (50.5ms) Completed 200 OK in 66ms (Views: 60.7ms | ActiveRecord: 0.2ms) Started POST "/users/login" for 172.20.10.110 at 2013-06-20 14:43:30 +0000 Processing by UsersController#login as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"Ls1K7d/2gqIptrhH8NKnqmIpQI0rEAbYP9MXfOg89DA=", "login"=>{"login"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Login"} Expire fragment views/tabs_and_title_records-1 (0.1ms) Expire fragment views/tabs_and_title_records-1 (0.1ms) Redirected to http://172.20.10.172:3000/dashboard Completed 302 Found in 1136ms (ActiveRecord: 918.4ms) Started GET "/dashboard" for 172.20.10.110 at 2013-06-20 14:43:32 +0000 Processing by DashboardController#index as HTML Rendered dashboard/welcome.html.erb within layouts/application (4.2ms) Rendered home/_user_dropdown.html.erb (241.2ms) Read fragment views/tabs_and_title_records-1 (0.1ms) Rendered home/_org_switcher.html.erb (0.3ms) Rendered home/_settings.html.erb (9.5ms) Write fragment views/tabs_and_title_records-1 (0.6ms) Rendered home/_topbar.html.erb (16.4ms) Filter chain halted as :welcome rendered or redirected Completed 200 OK in 319ms (Views: 315.8ms | ActiveRecord: 0.7ms)
I'm trying a full installer build next (foreman/psql/passenger)
Updated by Greg Sutcliffe over 11 years ago
Likewise, an RC2 box upgraded to latest nightly didn't show this behaviour either. David, any chance you can try a fresh install and confirm?
Updated by Dominic Cleal over 11 years ago
- Status changed from Assigned to Feedback
Updated by David Blank-Edelman over 11 years ago
I believe this issue is still present in the 1.2 stable release. I upgraded a 1.1.1 box (also built from packages) via the 1.2 Ubuntu precise packages from the foreman stable repo and found that the login screen threw the following error to the log and wouldn't let me log in:
Operation FAILED: couldn't find file 'jquery.ui.autocomplete' Rendered common/500.html.erb within layouts/application (18.8ms) Completed 500 Internal Server Error in 236ms ActionView::Template::Error (couldn't find file 'jquery.ui.autocomplete' (in /usr/share/foreman/app/assets/stylesheets/application.scss:2)): 2: <html lang="<%= I18n.locale -%>"> 3: <head> 4: <title> <%= h(yield(:title) || "Foreman") %></title> 5: <%= stylesheet_link_tag 'application' %> 6: <%= javascript_include_tag 'application' %> 7: <%= csrf_meta_tags %> 8: <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %> app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__1965744571_69851449048560' app/controllers/application_controller.rb:329:in `generic_exception'
installing the foreman-assets package didn't help things (the .deb doesn't seem to have much in it?), but the following fixed my install so I could log in:
RAILS_ENV=production bundle exec rake assets:precompile
Updated by Greg Sutcliffe over 11 years ago
The assets package contains the instructions for foreman to include the asset-related gems at startup - without it you wouldn't be able to run that rake task. It doesn't actually include the assets, as they're precompiled into the main package.
I can't replicate this at all, sadly. I did a 1.1-1 install (foreman, proxy and sqlite3) on Precise using the 1.1 installer, and verified it was working. I then upgraded just the installer to 1.2 to make sure 1.1-1 worked with the new configuration changes in the installer (adding in postgresql-1.1-1 since the new installer defaults to postgresql) - still fine. I then upgraded the foreman* packages to 1.2.0 and re-ran the installer just to be sure - all fine. I'm out of ideas at this point, sorry.
Updated by David Blank-Edelman over 11 years ago
Greg, thanks for trying to reproduce this thanks for the explanation of what is in the package. The one noticeable difference in our case (but I can't see how it would matter) was we went 1.1 -> 1.2 where both were postgres. At no time during the upgrade did I run the installer beyond what the packages' postinst did themselves.
So a test for my situation would be:
- install 1.1 from packages + postgres (adjusting config file like database.yml accordingly)
- upgrade to 1.2 again from packages
and see if it works. I'd be tempted to backrev to see if I could help reproduce this but our instance is in production (and 1.2 is so very very nice, kudos to the team).
--dNb
Updated by Greg Sutcliffe over 11 years ago
During my test, I switched from sqlite to postgres while still on 1.1, verified it, and then upgraded to 1.2; so we're doing the same steps. Should we close it for now, do you think?
Updated by David Blank-Edelman over 11 years ago
Yes, I think without a reliable way to reproduce this that's the best choice. I'm just sorry I couldn't provide that to you. If this comes up again in the future and there is something I can provide to help narrow this down, please don't hesitate to ask.
Updated by Greg Sutcliffe over 11 years ago
- Status changed from Feedback to Closed
Yeah, I hate HeisenBugs (ones that change when you observe them :P) too. Do re-open this is you see it again...
Updated by David Schmitt over 11 years ago
- Status changed from Closed to Assigned
Sadly, I hit the same error on upgrade from 1.2.0+debian2 to 1.2.1+debian1.
I've uploaded the debs and /usr/share/foreman (--exclude database.yml) to
http://club.black.co.at/foreman-tmp/
Perhaps you can see something.
Here's a list of the installed dependencies:
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================================================-===============================-===============================-=============================================================================================================== ii bundler 1.2.2-2 all Manage Ruby application dependencies ii foreman 1.2.1+debian1 amd64 Systems management web interface ii foreman-compute 1.2.1+debian1 all metapackage providing fog dependencies for Foreman (for Amazon EC2 support) ii foreman-libvirt 1.2.1+debian1 all metapackage providing libvirt dependencies for Foreman ii foreman-postgresql 1.2.1+debian1 all metapackage providing PostgreSQL dependencies for Foreman ii foreman-proxy 1.2.1+debian1 all RESTful proxies for DNS, DHCP, TFTP, and Puppet ii gcc 4:4.7.2-1 amd64 GNU C compiler ii libpq-dev 9.1.9-1 amd64 header files for libpq5 (PostgreSQL library) ii libvirt-dev 0.9.12-11+deb7u1 amd64 development files for the libvirt library ii libxml2-dev:amd64 2.8.0+dfsg1-7+nmu1 amd64 Development files for the GNOME XML library ii libxslt1-dev 1.1.26-14.1 amd64 XSLT 1.0 processing library - development kit ii make 3.81-8.2 amd64 An utility for Directing compilation. ii pkg-config 0.26-1 amd64 manage compile and link flags for libraries ii puppet 3.2.3-1puppetlabs1 all Centralized configuration management - agent startup and compatibility scripts ii rake 0.9.2.2-4 all ruby make-like utility ii ruby-json 1.7.3-3 amd64 JSON library for Ruby ii ruby-rkerberos 0.1.1-1 amd64 Kerberos binding for Ruby ii ruby-sinatra 1.3.6-1 all Ruby web-development dressed in a DSL ii ruby1.9.1 1.9.3.194-8.1 amd64 Interpreter of object-oriented scripting language Ruby ii ruby1.9.1-dev 1.9.3.194-8.1 amd64 Header files for compiling extension modules for the Ruby 1.9.1
Trying the assets:precompile task failed:
foreman@puppetmaster:~$ RAILS_ENV=production bundle exec rake assets:precompile --trace ** Invoke assets:precompile (first_time) ** Execute assets:precompile /usr/bin/ruby1.9.1 /usr/share/foreman/vendor/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace ** Invoke assets:precompile:all (first_time) ** Execute assets:precompile:all ** Invoke assets:precompile:primary (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:primary rake aborted! couldn't find file 'jquery' (in /usr/share/foreman/app/assets/javascripts/application.js:1) /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:102:in `resolve' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:142:in `require_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:215:in `process_require_directive' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:165:in `block in process_directives' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:163:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:163:in `process_directives' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:97:in `evaluate' /usr/share/foreman/vendor/ruby/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:12:in `initialize' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in `block in compile' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file' /usr/share/foreman/vendor/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>' /usr/share/foreman/vendor/ruby/1.9.1/bin/rake:23:in `load' /usr/share/foreman/vendor/ruby/1.9.1/bin/rake:23:in `<main>' Tasks: TOP => assets:precompile:primary rake aborted! Command failed with status (1): [/usr/bin/ruby1.9.1 /usr/share/foreman/vend...] /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:55:in `block in create_shell_runner' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in `call' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in `sh' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in `sh' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils.rb:82:in `ruby' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in `ruby' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in `ruby_rake_task' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task' /usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `each' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run' /usr/share/foreman/vendor/ruby/1.9.1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>' /usr/share/foreman/vendor/ruby/1.9.1/bin/rake:23:in `load' /usr/share/foreman/vendor/ruby/1.9.1/bin/rake:23:in `<main>' Tasks: TOP => assets:precompile foreman@puppetmaster:~$
Here's the relevant segment from RAILS_ENV=production strace -e file -f bundle exec rake assets:precompile:
[...] [pid 26652] stat("/usr/share/foreman/app/assets/javascripts/trends.js", {st_mode=S_IFREG|0644, st_size=299, ...}) = 0 [pid 26652] stat("/usr/share/foreman/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994", 0x7fffb3ca4c90) = -1 ENOENT (No such file or directory) [pid 26652] open("/usr/share/foreman/app/assets/javascripts/application.js", O_RDONLY) = 10 [pid 26652] stat("/usr/share/foreman/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655", 0x7fffb3ca4930) = -1 ENOENT (No such file or directory) [pid 26652] open("/usr/share/foreman/app/assets/javascripts/application.js", O_RDONLY) = 10 [pid 26652] stat("/usr/share/foreman/app/assets/stylesheets", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/app/assets/stylesheets", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/assets/fonts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/assets/fonts", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/assets/javascripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/assets/javascripts", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/assets/stylesheets", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/assets/stylesheets", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/images", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/images", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/javascripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/javascripts", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/stylesheets", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 26652] open("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/stylesheets", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 10 [pid 26652] stat("/usr/share/foreman/app/assets/images/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/app/assets/javascripts/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/app/assets/stylesheets/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/assets/fonts/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/assets/javascripts/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/assets/stylesheets/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/images/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/javascripts/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) [pid 26652] stat("/usr/share/foreman/vendor/ruby/1.9.1/gems/scoped_search-2.6.0/app/assets/stylesheets/jquery", 0x7fffb3ca36f0) = -1 ENOENT (No such file or directory) rake aborted! couldn't find file 'jquery' (in /usr/share/foreman/app/assets/javascripts/application.js:1) Tasks: TOP => assets:precompile:primary (See full trace by running task with --trace) [pid 26652] unlink("/usr/share/foreman/tmp/cache/assets/sprockets%2Fc86d879eef031a28cab4fe3c7051e3b120130814-26652-xvp4lj") = -1 ENOENT (No such file or directory) [pid 26652] unlink("/usr/share/foreman/tmp/cache/assets/sprockets%2Fbcc6f7bbbdde7eb92142488ee0ccbd7720130814-26652-1oxlw8b") = -1 ENOENT (No such file or directory) [pid 26652] unlink("/usr/share/foreman/tmp/cache/assets/sprockets%2F1224ba8012faba141898dabce696715d20130814-26652-ou777s") = -1 ENOENT (No such file or directory) [pid 26652] unlink("/usr/share/foreman/tmp/cache/assets/sprockets%2Fd0ad572980656923b97e2e49d21b9bb320130814-26652-zi1dft") = -1 ENOENT (No such file or directory) Process 26684 detached Process 26640 resumed Process 26652 detached [pid 26653] --- SIGCHLD (Child exited) @ 0 (0) --- rake aborted! Command failed with status (1): [/usr/bin/ruby1.9.1 /usr/share/foreman/vend...] Tasks: TOP => assets:precompile (See full trace by running task with --trace) Process 26653 detached
Updated by Greg Sutcliffe over 11 years ago
- Status changed from Assigned to Feedback
I would expect the assets:precompile to fail - you don't have foreman-assets installed. I downloaded your tarball and with a clean db (sqlite) Foreman started fine for me. I then installed foreman-assests and the rake task also worked fine.
Asset compilation is done in the package, so you shouldn't need to run that task normally - if you do, you need to install foreman-assets to get the requisite gems.
Updated by David Schmitt over 11 years ago
Thanks for that testing!
I've now restarted the apache/passenger hosting the foreman, and voila! it works again. This seems to be the actual cluprit. I guess there's nothing the package can do about restarting passenger.
Sorry for the whole noise, I should have known better.
Updated by Greg Sutcliffe over 11 years ago
- Status changed from Feedback to Resolved
No worries, glad it was quick to resolve ;)
Updated by Dominic Cleal over 11 years ago
David Schmitt wrote:
I've now restarted the apache/passenger hosting the foreman, and voila! it works again. This seems to be the actual cluprit. I guess there's nothing the package can do about restarting passenger.
Could we have the package postinstall touch ~foreman/tmp/restart.txt?
Updated by Ash Caire over 11 years ago
David, were you using Example42's module to install Foreman? I'm running into the same issues.