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

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

Related

Error while running Calabash-android with a test app

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.

Unable to deploy to Digital Ocean VPS using Capistrano because of JSON::GeneratorError: source sequence is illegal/malformed utf-8

I have searched for hours for a solution to this issue with no avail. I can't seem to be able to fix this.
*cap production deploy * throws the following error as shown in the log.
This solution doesn't help.
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#xxx.xxx.xx.xxx: rake exit status: 1
rake stdout: rake aborted!
JSON::GeneratorError: source sequence is illegal/malformed utf-8
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/json-1.8.3/lib/json/common.rb:223:in `generate'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/json-1.8.3/lib/json/common.rb:223:in `generate'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs/external_runtime.rb:46:in `call'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:212:in `run_uglifyjs'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:179:in `compile'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:52:in `call'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/uglifier_compressor.rb:28:in `call'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/loader.rb:60:in `block in load'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/loader.rb:44:in `load'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:in `yield'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/base.rb:66:in `find_asset'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:138:in `block in find'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:204:in `each'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:204:in `stat_directory'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/path_utils.rb:222:in `stat_tree'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:105:in `each'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:104:in `each'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/legacy.rb:104:in `logical_paths'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:136:in `find'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:162:in `compile'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-3.4.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/html/app/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake stderr: Nothing written
[1]: https://stackoverflow.com/questions/31372478/rake-aborted-jsongeneratorerror-source-sequence-is-illegal-malformed-utf-8-a
I am patiently waiting on a solution
One of the JS files being compiled contains invalid UTF-8 bytes. I don't know which one, but the way I would suggest you debug it is to locally edit the equivalent path to /var/www/html/app/shared/bundle/ruby/2.2.0/gems/json-1.8.3/lib/json/common.rb:223:ingenerate'` to wrap the breaking call in a block like:
begin
# Whatever normally goes here.
rescue JSON::GeneratorError
puts whateverliststhefilename
end
If you are already using this, you can also just drop in binding.pry instead of puts.
Once you know the filename, run it through UTF-8 validators like the one you saw in the linked SO answer, and fix it. If the JS is in a gem, try restoring the gem to a pristine condition. If the JS is in your project, fix it accordingly.
You can use http://guides.rubygems.org/command-reference/#gem-pristine to restore a modified or corrupted gem. Be sure to remove your debugging code from the gem file when you are done.
This is more of a teach how to fish answer than a "this is what is wrong and how to fix it" answer. Sorry about that, but there is no way for us to do this unless it is a commonly known issue in a gem, which a Google search would have brought up, or if we have the entire source code.
Hope this helps!

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 :)

Getting "undefined method 'changed?'" error on vmc push after latest upgrade

After upgrading to vmc 0.4.4 I can't do push on my Sinatra app anymore
Any known fixes?
Time of crash:
2012-12-06 13:14:20 -0800
NoMethodError: undefined method `changed?' for #
vmc-0.4.4/lib/vmc/cli/app/push/sync.rb:13:in display_changes'
vmc-0.4.4/lib/vmc/cli/app/push.rb:89:insync_app'
vmc-0.4.4/lib/vmc/cli/app/push.rb:80:in push'
mothership-0.3.4/lib/mothership/base.rb:61:inrun'
mothership-0.3.4/lib/mothership/command.rb:68:in block in invoke'
manifests-vmc-plugin-0.4.17/lib/manifests-vmc-plugin/plugin.rb:113:incall'
manifests-vmc-plugin-0.4.17/lib/manifests-vmc-plugin/plugin.rb:113:in block (2 levels) in <class:Manifests>'
mothership-0.3.4/lib/mothership/callbacks.rb:74:inwith_filters'
manifests-vmc-plugin-0.4.17/lib/manifests-vmc-plugin/plugin.rb:112:in block in <class:Manifests>'
mothership-0.3.4/lib/mothership/command.rb:78:ininstance_exec'
mothership-0.3.4/lib/mothership/command.rb:78:in block (2 levels) in invoke'
mothership-0.3.4/lib/mothership/command.rb:82:ininstance_exec'
mothership-0.3.4/lib/mothership/command.rb:82:in invoke'
mothership-0.3.4/lib/mothership/base.rb:50:inexecute'
vmc-0.4.4/lib/vmc/cli.rb:106:in execute'
mothership-0.3.4/lib/mothership.rb:45:instart'
vmc-0.4.4/bin/vmc:11:in <top (required)>'
ruby-1.9.2-p290#main1.9/bin/vmc:23:inload'
ruby-1.9.2-p290#main1.9/bin/vmc:23:in `'
If you experience any issues with vmc 0.4.x at all, I advice you install the legacy version (0.3.23). You can remove 0.4.4 entirely or you can call a specific version (0.3.23 in this case) using the following syntax..
vmc _0.3.23_ <command>

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.