Error while running Calabash-android with a test app - calabash

I am trying to set up Calabash-android to run with a test app but keep getting the following error.
I have generated keystore file in .android folder, but still getting the same error.
D:\Calabash>calabash-android resign EdgeConnectQA.apk
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:118:in ``': No such file or directory - "C:/Program Files (x86)/android-sdk_r10-windows/android-sdk-windows/platform-tools/aapt" list "C:/Users/u46646/AppData/Local/Temp/d20161027-10688-1rl21xu/unsigned.apk" (Errno::ENOENT)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:118:in `unsign_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:111:in `block in resign_apk'
from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:106:in `resign_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/bin/calabash-android:114:in `<top (required)>'
from C:/Ruby193/bin/calabash-android:23:in `load'
from C:/Ruby193/bin/calabash-android:23:in `<main>'
D:\Calabash>

Upgrade your Calabash-Android version. 0.5.14 is very old.

Related

unable to open the ticket in Red-Mine from From Gmail

I am trying to open ticket in RedMine from Gmail. Getting below error -
below is the command i am trying to execute -
rake redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com port=143 username=my_gmail_id password=****** folder=inbox project=my_project_name allow_override=project,tracker,priority
WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.9.3
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
rake aborted!
LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /home/ubuntu/redmine-3.4.6-3/apps/redmine/htdocs/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.so
/home/ubuntu/redmine-3.4.6-3/apps/redmine/htdocs/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in require'
/home/ubuntu/redmine-3.4.6-3/apps/redmine/htdocs/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in <top (required)>'
/home/ubuntu/redmine-3.4.6-3/apps/redmine/htdocs/config/application.rb:5:in <top (required)>'
/home/ubuntu/redmine-3.4.6-3/apps/redmine/htdocs/Rakefile:5:in <top (required)>'
Try using this, you need to mention ruby located on the script.
/usr/local/rvm/wrappers/ruby-2.2.5/rake -f /var/www/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=your.host.com port=993 ssl=1 username=mail..com password=xxxx unknown_user=accept no_permission_check=1 project="general" tracker="your_tracker" allow_override=project,tracker,priority

Cannot generate controller ,model or start rails server

I recently started getting problems in generating controllers,models and starting rails server in new projects. I am able to do all these things in old projects.
What can be done to resolve this error?
OS: Ubuntu 15.04 ,Ruby:2.1 ,Rails: 4.2.0
Error Output:
aditya#Aditya-PC:~/testRails/blog$ rails g controller pages
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
/var/lib/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x00000002ec6c40> (NoMethodError)
from /home/aditya/testRails/blog/config/application.rb:24:in `<class:Application>'
from /home/aditya/testRails/blog/config/application.rb:10:in `<module:Blog>'
from /home/aditya/testRails/blog/config/application.rb:9:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `require'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `preload'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
EDIT: I removed rails completely and again installed. But no effect, still having this error.
Have you tried to run bundle install in the application?
According to the error seems like you created a new rails app without activerecord
'method_missing': undefined method 'active_record' for #Rails::Application::Configuration
the stack trace is hinting at /home/aditya/testRails/blog/config/application.rb:24
If removing activerecord is intentional follow along to remove anything that is related to activerecord, if not continue reading as you might figure out what went missing ;)
remove any activerecord config from application.rb or environments/*
check your config/application.rb if
require 'rails/all is present, remove it and add the railties that you need like:
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_job/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
# require "railtie/active_record"
remove any adapter from the Gemfile (mysql2, pg, sqlite3)
remove config/database.yml
Hope it helps :)

Rails 4 binstubs errors

I was playing around with bundler and binstubs and "rake rails:update:bin" and the next time I tried to run rails s i got this exception:
`inherited': undefined method `application' for Rails:Module (NoMethodError)
The same exception appears even for new projects that I create and try to run.
Here's the full text:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:63:in `inherited': undefined method `application' for Rails:Module (NoMethodError)
from F:/aptana projects/testy/config/application.rb:10:in `<module:Testy>'
from F:/aptana projects/testy/config/application.rb:9:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Well, a few minutes after posting this I tried:
gem uninstall railties
and then again
bundle install
and it resolved the issue. I still have no idea what might have happened in the first place though.

Rails 4.0 install error -require: cannot load such file -- active_support (LoadError)

I installed the new Ruby (2.0) and Rails 4.0 and when i do "Rails new test_app" i get the following.
Anybody run into this?
[devuser#devbox ~]$ rails new test_app
/usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require': cannot load such >file -- active_support (LoadError)
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/generators.rb:4:in ><top (required)>'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties->4.0.0.beta1/lib/rails/commands/application.rb:28:in'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/cli.rb:15:in <top >(required)>'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/bin/rails:7:in'
from /usr/local/bin/rails:23:in load'
from /usr/local/bin/rails:23:in'
My problem was permission related. Somehow, the "other" user needs rx permissions.
I did the following and it works now:
sudo chmod -R o+rx /usr/local/lib/ruby/gems/2.0.0/gems/
If you getting cannot load such file and its pointing to require statement, check your permissions for /gems folder and folders underneat.
Create an gemset and use it in rvmrc.
Then come out of the project using Cd ../
Again enter into project, this time it will show,
"RVM has encountered a new or modified .rvmrc file in the current directory"
Type 'Yes'.
and now give bundle install.
It will work.

Jruby LoadError: Could not open any of [xml2, xslt, exslt] WINDOWS

I am running on windows vista 64 bit operating system. Geografikos is a large project created as a masters thesis project by Jeremy Witmer. It is all coded in JRuby. I am currently expanding the project under his guidance however I cannot run his program. The following gems have been installed:
C:\work\Code\geografikos>jruby -S gem list
*** LOCAL GEMS ***
actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activerecord-jdbc-adapter (0.9.1)
activerecord-jdbcmysql-adapter (0.9.1)
activeresource (2.3.3)
activesupport (2.3.3)
gchart (1.0.0)
google-geocode (1.2.1)
hoe (2.3.3)
hpricot (0.6.161)
jdbc-mysql (5.0.4)
jruby-openssl (0.5.1)
minitest (1.4.2)
nokogiri (1.3.3)
rack (1.0.0)
rails (2.3.3)
rake (0.8.7)
rc-rest (3.0.0)
rdoc (2.4.3)
rspec (1.2.6)
rubyforge (1.0.4)
rubygems-update (1.3.5)
sources (0.0.1)
geografikos.rb requires the following gems:
%w(rubygems digest/sha1 digest/md5 active_record hpricot yaml open-uri ostruct java google_geocode gchart active_record/fixtures).each{|f| require f}
I get the following error when I require or run geografikos.rb:
C:\work\Code\geografikos>jirb
irb(main):001:0> require 'geografikos'
LoadError: Could not open any of [xml2, xslt, exslt]
from C:/jruby-1.3.1/bin/../lib/ruby/1.8/ffi/library.rb:18:in `ffi_lib'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri/ffi/libxml.rb:5
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri/ffi/libxml.rb:31:in `require'
from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri.rb:10
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri.rb:31:in `require'
from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/rc-rest-3.0.0/lib/rc_rest.rb:3
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/rc-rest-3.0.0/lib/rc_rest.rb:31:in `require'
from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geocode.rb:2
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geocode.rb:36:in `require'
from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
from geografikos.rb:304
from geografikos.rb:304:in `each'
from geografikos.rb:304
from geografikos.rb:2:in `require'
from (irb):2irb(main):002:0>
I have a feeling that I need to install the xml, xml2, xslt, and exslt libraries but I get an error when I attempt to install these which is shown below:
C:\work\Code\geografikos>jruby -S gem install libxml-ruby
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
C:/jruby-1.3.1/bin/../bin/jruby.bat extconf.rb
C:/jruby-1.3.1/bin/../lib/ruby/1.8/mkmf.rb:7: JRuby does not support native extensions. Check wiki.jruby.org for alternatives. (No
tImplementedError)
from C:/jruby-1.3.1/bin/../lib/ruby/1.8/mkmf.rb:14:in `require'
from extconf.rb:14
Gem files will remain installed in C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3 for inspection.
Results logged to C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/ext/libxml/gem_make.out
Please let me know if you need any other information. I cannot solve this problem!
It appears that those gems are implemented "natively"; that is, in a low-level language rather than directly in Ruby. JRuby does not support gems with native extensions because it can't run them in the JVM.