Redmine 2.1.2 using a Thin service on Windows Server 2003
Great product, finally have it working after a few days of tinkering. The last stumbling block is the 'receive_imap'. I'm running manually from the command line and it seems to work (emails are being received and added to tickets) but the command never ends.
The ruby.exe process is still in task manager but never ends no matter how long I wait. If I kill the ruby.exe then the command line goes back to 'Terminate Batch Job Y/n'.
Command is:
rake -f D:\Redmine\Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=mail username=user#server.com.au password=password
Adding '--trace' to the end shows nothing interesting, just gets to '**Execute redmine:email:receive_imap'.
Strange though that it does succeed in bringing the emails in!
I left the process running over the weekend and it seems to have ended at some point. I pushed enter at the command line and it went back to the prompt.
It seems that the process will end after about 30 minutes if I let it go.
When I run the rake command, within about 15 seconds the mailbox is checked and updates to the issues are logged, but after that the process is just sitting there doing nothing.
Is there any additional logging I can enable to see what the issue is? The production.log doesn't show much and the mail server just sees the connect etc.
Watching the IMAP connections in Exchange System Manager the actual IMAP connection is still connected for the entire time the process is going.
UPDATE:
I've just set up a Bitnami stack in a VM and ran the same command, it runs in seconds and the emails are imported straight away... so it's def not an Exchange issue. I'm struggling to see what the difference could be!
I can telnet to the mail server on port 143 so it's not the firewall. I've also installed the 1.8.7 version of Ruby and used 'pik' to switch to it before running the rake command and still the same issue.
I'm really struggling here as this is the only feature stopping us from going live now!
Anyone have any ideas?
Thanks in advance!
Details:
ruby -v:
ruby 1.9.3p286 (2012-10-12) [i386-mingw32]
Rails -v:
Rails 3.2.8
gem list:
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
acts-as-taggable-on (2.3.3)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.4, 3.0.0)
bundler (1.2.1)
coderay (1.0.8)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.0.rc.4 x86-mingw32)
hike (1.2.1)
i18n (0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.7.5, 1.5.4)
mail (2.4.4)
mime-types (1.19)
minitest (2.5.1)
multi_json (1.3.6)
mysql2 (0.3.11 x86-mingw32)
net-ldap (0.3.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
ruby-openid (2.1.8)
sprockets (2.1.3)
thin (1.5.0)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.11)
tzinfo (0.3.34, 0.3.33)
ya2yaml (0.31)
I had the same problem of you.
My solution isn’t the ideal, but works.
I added the command above at the end of method check on the file apps\redmine\htdocs\lib\redmine\imap.rb:
Process.exit!(true)
I have helped.
Related
i have an old rails project here running rails 2.3.8 and ruby 1.8.7 with rvm.
when i'm running rake -T or another rake task it will fail with
I18n::UnknownFileType: can not load translations from /home/project/trunk/vendor/rails/activesupport/lib/active_support/locale/en.yml, the file type yml is not known
running some YAML in the console, will work.
i found some solutions for rails 3 and ruby 1.9.3 (Rails 3: 'The file type yml is not known' when trying to access basic _form.html.erb) and rails 2.3 with ruby 2 (Rails legacy app and Ruby 2 error: can not load translations from the file type yml is not known) but didnt help.
my Gems used in this project:
actionmailer (2.3.18)
actionpack (2.3.18)
activerecord (2.3.18)
activeresource (2.3.18)
activesupport (2.3.18)
afm (0.2.2)
Ascii85 (1.0.2)
bundler-unload (1.0.2)
color (1.8)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
hashery (2.1.1)
iconv (1.0.4)
little-plugger (1.1.4)
logging (2.0.0, 1.8.2)
multi_json (1.11.2)
mysql (2.9.1)
pdf-core (0.6.0)
pdf-reader (1.3.3)
pdf-writer (1.1.8)
prawn (2.0.2, 0.12.0)
rack (1.1.6)
rails (2.3.18)
rake (10.4.2, 10.1.1)
ruby-rc4 (0.1.5)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
transaction-simple (1.4.0.2)
ttfunk (1.4.0, 1.0.3)
script/console and script/server running fine.
i have to use ruby 1.8.7 and cannot update. upgrade to rails 3 is'nt possible in month's :)
do you have some idea's to get the rake tasks running?
best
robert
i found the solution:
there was several problems:
rake (10.4.2, 10.1.1) now just using rake 10.1.1
logging (2.0.0, 1.8.2) now just using logging 1.8.2
(after testing) had to replace rdoctask with task in Rakefile
now rake -T works fine
In Ruby on Rails, I am trying to install it on my Windows machine following the step-by-step instructions indicated in http://railsinstaller.org/windows
On step 7, it says we should type in this command:
$ rails g controller welcome index
And so I do:
PS C:\Sites\railsinstaller_demo> rails g controller welcome index
And I get this error:
C:/Program Files/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems.rb:926:in
`report_activate_error': Could not find RubyGem railties (>= 0) (Gem::LoadError)
from C:/Program Files/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems.rb:244:in
`activate_dep'
from C:/Program Files/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems.rb:236:in `activate'
from C:/Program Files/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems.rb:1307:in `gem'
from C:/RailsInstaller/Ruby1.9.3/bin/rails:18:in `<main>'
I have googled this error and read that the solution was to install de DevKit and so I did, but the problem remains.
What causes these errors?
Edit:
This is what appears when I run gem list:
PS C:\Sites\railsinstaller_demo> gem list
*** LOCAL GEMS ***
actionmailer (3.2.9)
actionpack (3.2.9)
activemodel (3.2.9)
activerecord (3.2.9)
activeresource (3.2.9)
activesupport (3.2.9)
arel (3.0.2)
builder (3.0.4)
erubis (2.7.0)
foreman (0.60.2)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
mail (2.4.4)
mime-types (1.19)
minitest (1.6.0)
multi_json (1.5.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rake (0.8.7)
rdoc (2.5.8)
rest-client (1.6.7)
sequel (3.20.0)
sinatra (1.0)
sprockets (2.2.2)
taps (0.3.24)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
As suggested by #EricLeschinski I tried tu run "gem install rails" but this error appeared:
PS C:\Sites\railsinstaller_demo> gem install rails
ERROR: Error installing rails:
The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
Final edit:
In the end, I don't how bad I messed up my initial installation, but I found this Youtube video http://www.youtube.com/watch?v=WUdDdiu8kBs which turned out to be the clearest way to install everything that I needed and had no problem at all following her instructions.
Could not find RubyGem railties
This error is due to the difference between the rails version you are using and the one defined in the Gemfile.
Try rails -v to check the rails version.
Reference : https://www.railstutorial.org/book/toy_app
I'm trying to get set up to make front-end changes to a Rails 2.3.3 app, and I cannot get the environment set up in a way the application will start up (with script/server). I'm using RVM to run Ruby 1.8.7 with Rails 2.3.3, but when I try to start the server I get the following error:
/Users/myusername/.rvm/gems/ruby-1.8.7-p334#rails233/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:55:uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
followed by the trail of filed to get there. Googling led me to add require 'thread' to boot.rb so my error changes to
/Users/myusername/.rvm/gems/ruby-1.8.7-p334#rails233/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:165:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
followed by the long trail of files it went through to get there. After Googling the error for a while, I think it has something to do with either my database.yml or some problem with actionmailer but I'm pretty much at a loss. I don't know if this is nearly enough information for anyone to help me but if you have any ideas just let me know. Also my list of gems is:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.8, 2.3.3)
actionpack (3.0.8, 2.3.3)
activemodel (3.0.8)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (3.0.8, 2.3.3)
arel (2.0.10)
builder (3.0.0, 2.1.2)
erubis (2.6.6)
faker (0.3.1)
i18n (0.6.0, 0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.2.3, 1.0.1)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.3)
rake (0.8.7)
sqlite3 (1.3.3)
treetop (1.4.9)
tzinfo (0.3.27)
thanks for anything you can suggest!
That error has come up a couple times on me and as far as I know there isn't really a good solution. It comes from an incompatibility between rails 2.3.8 & lower and recent versions of ruby gems.
I suggest trying to use rails 2.3.11 or higher instead.
Refer to a previous question regarding this error:
Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
I'm trying to run rake commands on my local SQL server database using ODBC. I have setup the ODBC connections and thought I had the rails end covered however, i'm running into this error.
Please install the sqlserver adapter: gem install activerecord-sqlserver-adapter (no such file to load -- active_record/connection_adapters/sqlserver_adapter)
I have the following gems installed:
abstract (1.0.0)
actionmailer (3.0.5)
actionpack (3.0.5)
activemodel (3.0.5)
activerecord (3.0.5, 1.15.6)
activerecord-sqlserver-adapter (3.0.10)
activeresource (3.0.5)
activesupport (3.0.5, 1.4.4)
arel (2.0.9)
builder (3.0.0, 2.1.2)
bundler (1.0.10)
dbd-odbc (0.2.4)
dbi (0.4.1)
deprecated (3.0.0, 2.0.1)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
minitest (2.0.2, 1.6.0)
odbc-rails (1.5)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.7.1, 0.6.14)
rack-test (0.5.7)
rails (3.0.5)
railties (3.0.5)
rake (0.8.7)
rdoc (3.5.3, 2.5.8)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.25)
Am I missing a gem? What else do I need to get this running on my windows box?
Thanks in advance for any help :-)
Try to add such line in your %APP_ROOT%/Gemfile
gem 'activerecord-sqlserver-adapter'
Also, your way behind on the times. First the DBI/DBD-ODBC were removed from the adapter stack about a year ago. Also, the easiest way (and best performance) is to use TinyTDS for the connection mode. See there wiki here.
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Using-TinyTds
I have very simple (in fact empty ) project which i have created by rails new MyProject command from command-line. So, i want to import it to NetBeans IDE. I click "new project" -> "RoR" -> "from existing source", select Ruby 1.9.2 (instead of embedded JRuby) in the wizard form. After that i have got errors [see the picture below]:
So.. i click OK. And then try to run the RoR application from NetBeans clicking on the run-button and i got the following error in the log-panel:
/home/ses/.rvm/rubies/ruby-1.9.2-p136/bin/ruby: No such file or directory -- script/server (LoadError)
So how to handle these two problems?
p.s. my application is working when i launch it from the console.
i use ruby-1.9.2 and RoR 3.0 and Netbeans 6.9.1 and Ubuntu 10.10
and, replying the comment to my question. yes, i performed following commands:
bundle install
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.24)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.3)
Using arel (2.0.7)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.10)
Using mysql2 (0.2.6)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
bundle pack
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.24)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.3)
Using arel (2.0.7)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.10)
Using mysql2 (0.2.6)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Updating .gem files in vendor/cache
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Updating .gem files in vendor/cache
and following this page http://wiki.netbeans.org/FaqRubyRakeFetchingFailed
i did rake -D
this is what I did to get it working (had same problem):
New project > with existing sources
Tools > Ruby Platforms > select Ruby 1.9.2-p136 > Gem Manager > New Gems > rails > install
restart netbeans
open project (if it's not already opened) and right click > bundler > install
run
first of all, what you should't do is expect the debugger to work. because it's not going to work on netbeans, not on rails 3 (there are some hacks but they have problems).
secondly, Ruby on Rails Support Discontinued in NetBeans IDE. I loved the way Netbeans worked with rails 2.x, but I migrated to RubyMine because of it's support for Rails 3
hope this helps