Trying to import Issues from JIRA to Redmine - migration

Following this: https://www.redmine.org/issues/1385#note-43
I have been trying to run the following query: rake jira_migration:test_all_migrations RAILS_ENV=production
And below mentioned is the trace:
rake jira_migration:test_all_migrations RAILS_ENV=production --trace
rake aborted!
LoadError: cannot load such file -- config/environment
C:/xampp/htdocs/redmine-4.1.1/lib/tasks/migrate_jira.rake:4:in require' C:/xampp/htdocs/redmine-4.1.1/lib/tasks/migrate_jira.rake:4:in <top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/engine.rb:656:in load' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/engine.rb:656:in block in run_tasks_blocks'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/engine.rb:656:in each' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/engine.rb:656:in run_tasks_blocks'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/application.rb:515:in run_tasks_blocks' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/engine.rb:459:in load_tasks'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/railtie.rb:190:in public_send' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.2.4.2/lib/rails/railtie.rb:190:in method_missing'
C:/xampp/htdocs/redmine-4.1.1/Rakefile:7:in <top (required)>' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in load'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in load_rakefile' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:703:in raw_load_rakefile'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:104:in block in load_rakefile' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:186:in standard_exception_handling'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:103:in load_rakefile' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:82:in block in run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:186:in standard_exception_handling' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/lib/rake/application.rb:80:in run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rake-13.0.3/exe/rake:27:in <top (required)>' C:/RailsInstaller/Ruby2.3.3/bin/rake:22:in load'
C:/RailsInstaller/Ruby2.3.3/bin/rake:22:in `'

Followed these steps through the link posted in the question:
Go to Jira Administration -> Import & Export -> Backup Data to XML (*) * It's possible you have to configure a Backup Dir In the file:
/usr/local/jira/atlassian-jira-enterprise-4.1.2-standalone/atlassian-jira/WEB-INF/classes/jira-application.properties
For example adding this line: jira.paths.safe.backup.path=/tmp
Save the backup with the name: backup_jira.xml
Put this file in the main dir of redmine. In my case: /usr/local/lib/redmine-1.2
Download the script "migrate_jira.rake" developed by Luciano Pacheco: http://www.redmine.org/attachments/download/6106/migrate_jira.rake
Put the script in the [redmine dir]/lib/tasks/. In my case: /usr/local/lib/redmine-1.2/lib/tasks/
Now: cd /usr/local/lib/redmine-1.2
And: rake jira_migration:test_all_migrations RAILS_ENV="production"
Before this command we are getting a file called "map_jira_to_redmine.yml"
Edit this file with the editor you want (vi, pico, nano...). For instance: pico map_jira_to_redmine.yml
This file contains the priorities, types and status of your Jira Projects. On the left side Jira Features, On the right side Redmine Features. You can adjust your Redmine, for example the trackers in the Administration web section to link exactly with the features of your Jira Projects. You can do it the same process with the states and priorities.
Once you set this file. You only have to run this: rake jira_migration:do_all_migrations RAILS_ENV="production"

Related

LoadError: incompatible library version with nokogiri 1.6.8.1

I am working on quite old project which is running on old version of Ruby and Rails.
Ruby Version = 1.9.3p551
Rails verison = 3.1.10
So when i am trying to configure this project on new machine the it shows
the error related to NOKOGIRI.
"LoadError: incompatible library version - /home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri/nokogiri.so
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:32:in require'
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:32:inrescue in '
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:28:in <top (required)>'
/var/www/glo/config/application.rb:7:in'
/var/www/glo/Rakefile:4:in <top (required)>'
LoadError: cannot load such file -- nokogiri/2.3/nokogiri
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:30:inrequire'
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:30:in <top (required)>'
/var/www/glo/config/application.rb:7:in'
/var/www/glo/Rakefile:4:in `'
(See full trace by running task with --trace)
global#del1-lhp-N01167:/var/www/glo$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
"
I have tried many things but still this problem is not solved.
So please help me out from this.
Thanks

Siriproxy Server Error

I am trying to run Siriproxy on a fresh Raspberry Pi.
I have followed this tutorial step by step: http://www.hometoys.com/emagazine.php?art_id=2090
Everything looked to install 100%. But on the last step I tried to run 'rvmsudo siriproxy server' I get this error below.
siri#raspberrypi:~/SiriProxy$ rvmsudo siriproxy server
/home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `initialize': No such file or directory - /root/.siriproxy/config.ym l (Errno::ENOENT)
from /home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `open'
from /home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `load_file'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/lib/siriproxy/command_line.rb:143:in `parse_options'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/lib/siriproxy/command_line.rb:33:in `initialize'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/bin/siriproxy:6:in `new'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/bin/siriproxy:6:in `<top (required)>'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/bin/siriproxy:23:in `load'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/bin/siriproxy:23:in `<main>'
It seems like when you ran the sections involving cp ~/SiriProxy/config.example.yml ~/.siriproxy/config.yml you created these directories in your user directory, not in the root directory where it is looking. The ~/ symbol is shorthand for a home directory. Try learning how basic linux navigation works and matching up where your config.yml files should be stored-- e.g., root vs user directories.

Impossible to use rake in my rails project

Every time I try to use rake in my rails project it throw me the message below. I tried to re-install ruby, rails, rake, re-create the project, launch my rake db:migrate with sudo but nothing seems to work...
I created the object via the scaffold command:
rails generate scaffold User nom:string email:string
After this command execute succesfully, i launch
rake db:migrate
And it return this message:
rake aborted!
GONE
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks/documentation.rake:1:in `require'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks/documentation.rake:1:in `<top (required)>'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks.rb:15:in `load'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks.rb:15:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks.rb:6:in `each'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/tasks.rb:6:in `<top (required)>'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:213:in `require'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:213:in `initialize_tasks'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:139:in `load_tasks'
/var/lib/gems/1.9.1/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
/home/bassochette/Dev/rails/tuto/demo_app/Rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)
ps: I'm new to rails and in the learning phase.

Could not find cache store adapter for memory_store

For some reason anytime I'm running a Rails 3.0.3 application with Ruby 1.8.7. It's been running fine and I haven't set any cache_store settings anywhere. Now anytime I try to run rake tasks or rails command I get this:
$:rails console production
/home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/cache.rb:65:in `lookup_store': Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store) (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:22:in `with_warnings'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
from /home/marc_m3pt0/m3pt0.com/config/environment.rb:5
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:103:in `require_environment!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:22
from script/rails:6:in `require'
from script/rails:6
Any ideas on what I could be missing?
Thanks so much. My clients site is down right now so any help soon would be appreciated.
UPDATE
When I run rake tasks I get this:
Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store)
I saw this error recently when a shared host moved an application to a new server. I ended up blowing away the application's bundle and reinstalling it, and it seemed to work.
I use Capistrano for deployment, so if you use something else, YMMV. If your application root is this:
/home/jeff/myapp/
with the following subdirectories:
/home/jeff/myapp/current
/home/jeff/myapp/releases
/home/jeff/myapp/shared
the gem bundle is here:
/home/jeff/myapp/shared/bundle
Then I did:
rm -rf /home/jeff/myapp/shared/bundle
then
cd /home/jeff/myapp
bundle install
Once I did this, it seemed to work for me.

rake db:migrate aborted! on US-ASCII using rake 0.9.2.2 and rails 3.0.10

Recently I upgraded my gems and started adding new stuff to my app like authentication by third party social websites using omniauth gem. On development environment everything is fine and works like a charm.
I am deploying to staging and production servers using capistrano. Basic deployment is fine and working so far, but I have got really strange problems when I want to do migrations when deploying.
I get the following error messages from capistrano:
[my.server.com] executing command
*** [err :: my.server.com] rake aborted!
*** [err :: my.server.com] "\xC5" on US-ASCII
*** [err :: my.server.com]
*** [err :: my.server.com] (See full trace by running task with --trace)
command finished in 2472ms
I was googling all around and couldn't find any relevant solution. I also tried to downgrade rake gem back to 0.8.7 but with no success on the end - the same errors.
After hours of googling and digging in I found the solution that (I hope) may by helpful for someone with a similar or the same problem.
I did bundle exec rake --trace db:migrate on the staging server and got the following error messages:
rake aborted!
"\xC5" on US-ASCII
/var/www/myapp/test.myapp.com/releases/20111230233802/config/application.rb:5:in `read'
/var/www/myapp/test.myapp.com/releases/20111230233802/config/application.rb:5:in `<top (required)>'
/var/www/myapp/test.myapp.com/releases/20111230233802/Rakefile:4:in `require'
/var/www/myapp/test.myapp.com/releases/20111230233802/Rakefile:4:in `<top (required)>'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/bin/rake:19:in `load'
/var/www/myapp/test.myapp.com/shared/bundle/ruby/1.9.1/bin/rake:19:in `<main>'
So I jumped in to the config/application.rb file to find out what could rise the error. Line 5 of that file loads an external config file:
require 'yaml'
APP_CONFIG = YAML.load(File.read(File.expand_path('../app_config.yml', __FILE__)))
and that external file contains UTF-8 chars, not US-ASCII. So I tried a couple of different solutions to solve that problem.
The only one which worked for me was to add an extra few lines of code on top of config/application.rb file:
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
just to tell rake to load external files using utf-8 encoding. After that change everything went smooth and exactly as expected. Problem solved!
PS.
I really don't know why developers of rake 0.9 have changed previous behavior of rake 0.8 which worked fine for me and probably for you as well for a long time. Maybe you have an idea why? I am very curious.