After updgrading from Rails 5.0.1 to 5.2.0, there was an upgrade in active admin (from 1.0.0.pre5 to 2.6.0)
Now I am getting :
An ActionView::Template::Error occurred in sessions#new:
couldn't find file 'active_admin/nested_menu_arrow.gif'
Checked in these paths:
/mnt/d/Project/Wittybrains/Optisom/clarityv2/app/assets/images
/mnt/d/Project/Wittybrains/Optisom/clarityv2/app/assets/javascripts
/mnt/d/Project/Wittybrains/Optisom/clarityv2/app/assets/stylesheets
/mnt/d/Project/Wittybrains/Optisom/clarityv2/vendor/assets/javascripts
/mnt/d/Project/Wittybrains/Optisom/clarityv2/vendor/assets/stylesheets
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/lazy_high_charts-1.4.3/vendor/assets/javascripts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/activeadmin-ef1faccaef75/app/assets/javascripts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/activeadmin-ef1faccaef75/app/assets/stylesheets
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/activeadmin-ef1faccaef75/vendor/assets/javascripts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jquery-rails-4.3.5/vendor/assets/javascripts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/formtastic-3.1.5/app/assets/stylesheets
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actioncable-5.2.0/lib/assets/compiled
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activestorage-5.2.0/app/assets/javascripts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionview-5.2.0/lib/assets/compiled
/mnt/d/Project/Wittybrains/Optisom/clarityv2/app/assets/fonts
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/font-awesome-sass-4.5.0/assets/stylesheets
/root/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/font-awesome-sass-4.5.0/assets/fonts
app/assets/stylesheets/active_admin.css.scss:9
After digging on Google, finally I found this link :
https://git.rarolabs.com.br/rarolabs/active_admin/tree/1a16239be31d40307f3fee972e91ca15b9341167/app/assets/images/active_admin
What I did, I downloaded the necessary resources and keep in my project path at corresponding locations. This solves the issues.
After running
bundle exec rails s I get a huge error when trying to access the app via http://localhost:3000/
To debug this I need to see the top of the error trace, however the error trace is nearly 5000 items long and gets cut off at around line 3500.
How can I view the full error so I can start to debug ?
4701 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/server.rb
4702 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/runner.rb
4703 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/cluster.rb
4704 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/single.rb
4705 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/launcher.rb
4706 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/plugin/tmp_restart.rb
4707 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/faraday-0.12.1/lib/faraday/adapter/net_http_persistent.rb
4708 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/backtrace_cleaner.rb
4709 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/backtrace_cleaner.rb
4710 /Users/paul/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/web-console-3.5.1/lib/web_console/whiny_request.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.
You can redirect the output of the script to a file and look through that for your errors.
bundle exec rails s > my_file
This will put the output in the file "my_file". If you want to include the errors (stderr output) you also need to redirect that, so something like this:
bundle exec rails s > my_file 2>&1
Hi all can anyone help me to resolve the issue
'ArgumentError: cannot interpret as DNS name: nil'
The error is coming when doing capybara selenium integration testing in rails 4
here I am using jruby-1.7.9 and ruby version inside JRuby is 2.0.0p195
already I had used the Ruby version is 1.9.7 at that time I faced the error
'cant connect to chrome driver error'
in pure ruby like without using JRuby its the integration testing is working. but my application is in JRuby. and I am using ubuntu platform.
So anyone have any solution on this. what should I do to resolve this??
Here iam adding the exception backtrace
["/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:1181:in create'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:1027:ingenerate_candidates'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:1052:in resolv'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:518:ineach_resource'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:411:in each_address'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:120:ineach_address'", "org/jruby/RubyArray.java:1613:in each'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:119:ineach_address'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:97:in getaddress'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/resolv.rb:48:ingetaddress'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/1.9/resolv-replace.rb:10:in getaddress'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/1.9/resolv-replace.rb:22:ininitialize'", "org/jruby/RubyIO.java:1178:in open'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/net/http.rb:882:inconnect'", "org/jruby/ext/timeout/Timeout.java:144:in timeout'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/net/http.rb:881:inconnect'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/net/http.rb:866:in do_start'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/net/http.rb:855:instart'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/2.0/net/http.rb:582:in start'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara/server.rb:81:inresponsive?'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara/server.rb:97:in boot'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara/session.rb:72:ininitialize'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara.rb:324:in current_session'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara/dsl.rb:47:inpage'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara/dsl.rb:52:in visit'", "/media/sidharthan/NewVolume/sidharthan_fooddev/foodapp/webapp/food/test/test_helper.rb:115:inIntegrationTest'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/capybara-2.9.1/lib/capybara.rb:67:in configure'", "/media/sidharthan/NewVolume/sidharthan_fooddev/foodapp/webapp/food/test/test_helper.rb:102:inIntegrationTest'", "org/jruby/RubyBasicObject.java:1565:in instance_exec'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:446:inmake_lambda'", "org/jruby/RubyProc.java:271:in call'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:192:insimple'", "org/jruby/RubyProc.java:271:in call'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:incall'", "org/jruby/RubyArray.java:1613:in each'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:incall'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in __run_callbacks__'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:782:in_run_setup_callbacks'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in run_callbacks'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/testing/setup_and_teardown.rb:41:inbefore_setup'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/activerecord-4.2.6/lib/active_record/fixtures.rb:827:in before_setup'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:105:inrun'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:204:in capture_exceptions'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:104:inrun'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:255:in time_it'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:103:inrun'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:348:in on_signal'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:275:inwith_info_handler'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest/test.rb:102:in run'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:799:inrun_one_method'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:322:in run_one_method'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:310:inrun'", "org/jruby/RubyArray.java:1613:in each'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:309:inrun'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:348:in on_signal'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:335:inwith_info_handler'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:308:in run'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:158:in__run'", "org/jruby/RubyArray.java:2409:in map'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:158:in__run'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:135:in run'", "/home/sidharthan/.rbenv/versions/jruby-1.7.9/lib/ruby/gems/shared/gems/minitest-5.9.1/lib/minitest.rb:62:inautorun'"]
Thanks in advance
From the stacktrace you can see it's erring inside https://github.com/teamcapybara/capybara/blob/2.9.1/lib/capybara/server.rb#L81 - which is while Capybara is waiting for the application to be tested to start up.
This could mean you have set Capybara.server_host or Capybara.server_port incorrectly. Without the real code you're running that generates the stacktrace it's impossible to say.
You also probably want to update to the latest 2.x version of Capybara -- 2.9.1 is really old.
I have deployed my webapp on CentOS 7 using bundle --standalone and have configured the app to use the correct gems by using .bundle/config. It works great when I use rails server, but when I set it up to use passenger I get the following error:
[ 2016-02-02 13:27:50.7037 5134/7fb8225b8700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/rails-web: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 7b0eafb9
Error details saved to: /tmp/passenger-error-YR2EzW.html
Message from application: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
/usr/share/rubygems/rubygems/path_support.rb:68:in `path=': undefined method `+' for nil:NilClass (NoMethodError)
from /usr/share/rubygems/rubygems/path_support.rb:30:in `initialize'
from /usr/share/rubygems/rubygems.rb:357:in `new'
from /usr/share/rubygems/rubygems.rb:357:in `paths'
from /usr/share/rubygems/rubygems.rb:379:in `path'
from /usr/share/rubygems/rubygems/specification.rb:794:in `dirs'
from /usr/share/rubygems/rubygems/specification.rb:658:in `each_normal'
from /usr/share/rubygems/rubygems/specification.rb:669:in `_all'
from /usr/share/rubygems/rubygems/specification.rb:822:in `each'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find_inactive_by_path'
from /usr/share/rubygems/rubygems.rb:175:in `try_activate'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
from <internal:abrt_prelude>:2:in `<compiled>'
</pre>
The code around path_support.rb:68 involves setting GEM_PATH. What does this error message mean and how can I fix it. Thanks.
This appears passenger looks in /home/<username>/.gem/ruby as a part of its spawn process. If /home/<username> doesn't exist (like with system users that don't have home directories), you get this error.
Here is the bug report.
I am trying to deploy a Rails 3 application on Tomcat 6.0.24. The JRuby version is 1.6.2 (ruby-1.8.7-p330) and Warbler is 1.3.0. I use bundler to handle the gem dependencies.
Checked the WEB-INF/lib folder and the following jars are present:
jruby-rack-1.0.9.jar
jruby-core-1.6.2.jar
jruby-stdlib-1.6.2.jar
But, however after the server starts, hitting the application results in the following exception:
javax.servlet.ServletException: Filter execution threw an exception
java.lang.NoClassDefFoundError: Could not initialize class com.kenai.jaffl.struct.Struct$Constants
com.kenai.jaffl.struct.Struct$Signed64.<init>(Struct.java:1074)
org.jruby.ext.posix.HeapStruct$Int64.<init>(HeapStruct.java:41)
org.jruby.ext.posix.LinuxHeapFileStat.<init>(LinuxHeapFileStat.java:35)
org.jruby.ext.posix.LinuxPOSIX.allocateStat(LinuxPOSIX.java:26)
org.jruby.ext.posix.LinuxPOSIX.stat(LinuxPOSIX.java:107)
org.jruby.ext.posix.LazyPOSIX.stat(LazyPOSIX.java:226)
org.jruby.RubyFileTest.directory_p(RubyFileTest.java:102)
org.jruby.RubyFileTest.directory_p(RubyFileTest.java:87)
org.jruby.RubyFileTest$FileTestFileMethods.directory_p(RubyFileTest.java:428)
org.jruby.RubyFileTest$FileTestFileMethods$s$1$0$directory_p.call(RubyFileTest$FileTestFileMethods$s$1$0$directory_p.gen:65535)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.IfNode.interpret(IfNode.java:111)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:163)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:262)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:105)
org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
org.jruby.ast.IfNode.interpret(IfNode.java:117)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:120)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:145)
org.jruby.runtime.callsite.SuperCallSite.cacheAndCall(SuperCallSite.java:286)
org.jruby.runtime.callsite.SuperCallSite.callBlock(SuperCallSite.java:70)
org.jruby.runtime.callsite.SuperCallSite.call(SuperCallSite.java:75)
org.jruby.ast.ZSuperNode.interpret(ZSuperNode.java:101)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104).....
Does that ring any bells?
[Answer Updated]: The issue was with the java implementation on the server. It was Open JDK. I switched it over to Sun Java 1.6.0_26 and everything started working :)
Not sure if this is a new bug or an old one. Consider googling the error or looking on http://bugs.jruby.org.
You might try setting -Djruby.native.enabled=false in the VM to use the pure-Java POSIX layer and avoid this error.
The issue was with the java implementation on the server. It was Open JDK. I switched it over to Sun Java 1.6.0_26 and everything started working