Rajashekar R. | 10 Nov 08:37

Migrate tables FromOracle To Mysql

How can i migrate the oracle tables to mysql tables.

--

-- 
Posted via http://www.ruby-forum.com/.
Dan Langille | 19 Sep 00:18
Favicon
Gravatar

mongrel fails to start

I'm having trouble getting mongrel to start after upgrading some system components.

[dan <at> supernews:/usr/websites/papers.bsdcan.org/pentabarf/rails] $ mongrel_rails cluster::r::start
Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/rack-cache-1.0.3.gemspec]:
invalid date format in specification: "2011-08-27 00:00:00.000000000Z"
Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid
date format in specification: "2011-08-25 00:00:00.000000000Z"
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or
after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:109.
NOTE: from_installed_gems(arg) is deprecated. From
/usr/local/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:62:in `send'
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_gems_in called from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:50.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:67.
NOTE: Gem::SourceIndex#spec_dirs= is deprecated, use Specification.dirs=. It will be removed on or
after 2011-11-01.
Gem::SourceIndex#spec_dirs= called from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:94.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:95.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:322.

… etc

Ideas?  Suggestions?

--

-- 
Dan Langille - http://langille.org
(Continue reading)

abhishek m. | 10 Mar 08:32

Rows go missing when seen through APACHE but through Mongrail, works fine.

Hi,

In my site, I have implemented a functionality where we can fetch upto
100000 rows and display all of it at one shot on the GUI, through Java
interface.

Now, when I start my client through mongrail ( ./script/server -e
production ), I can see all the rows that get fetched from the DB.
However, through Apache, some of the rows go missing at random ( the
number of rows that go missing is random ).

Also, in the Java Console, I see the exception
"Java.lang.IllegalStateException: No Match Found", which again is random
( I mean rows go missing with or without this exception on the screen ).

I am using IE-7. Also, I found the missing rows, but we can see them on
the GUI, if the count of rows to be shown on GUI is less ( say around
100 ), but the issue of missing rows through apache is being seen only
if the count of rows to be shown on GUI is 1000 or more.

Please suggest, its kinda urgent.

Regards
Abhishek

--

-- 
Posted via http://www.ruby-forum.com/.
Russ Erickson | 25 Feb 23:23

mongrel/mongrel_rails windows question

Hello!

I'm just wondering if anyone has any recommendations for running
mongrel/mongrel_service under Windows (Client requires Windows Server
2008, SQL Server 2008, IIS7, no budget for a *nix box of any kind).  I
have a working setup, but wondering if anyone has any further insight.

Current working setup:

Ruby 1.87 (via rubyinstaller.org)
Rail 2.3.11
mongrel 1.1.15 (mingw32)
mongrel_service 0.4.0

I'll be looking at using the ARR features of IIS7 to do some load
balancing between a few instances of mongrel running on different ports
on the same box.

I have read a lot of posts from people discussing troubles in getting
Ruby 1.92 for windows working with mongrel 1.1.20pre and
mongrel_service.  Does anyone have a working setup of this and is it
worth fighting for?

Russ

--

-- 
Posted via http://www.ruby-forum.com/.
Greg Ma | 7 Dec 22:54

2 rails app on the same domain

Hi,
I have 2 app.
One one www.mysite.com and the second one on www.mysite.com/alerts

I have an issue with the routes on the second app. The Rails app thinks
"/alerts" is in my routes, whereas it should be the root of my app.

How do I override this in my routes or production file?

Greg

--

-- 
Posted via http://www.ruby-forum.com/.
Luis Flores | 3 Dec 01:48
Picon
Gravatar

ERROR: Failed to build gem native extension.

Hello, I am currently not able to instal mongrel, I run a Linux Ubuntu 10.04 system with Gems 1.3.7 when I do a "sudo gem install mongrel" I get this sequence of messages:
$ sudo gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:

ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:70: warning: format not a string literal and no format arguments
http11.c:71: warning: format not a string literal and no format arguments
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘request_uri’:
http11.c:102: warning: format not a string literal and no format arguments
http11.c: In function ‘fragment’:
http11.c:113: warning: format not a string literal and no format arguments
http11.c: In function ‘request_path’:
http11.c:124: warning: format not a string literal and no format arguments
http11.c: In function ‘query_string’:
http11.c:135: warning: format not a string literal and no format arguments
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
http11.c:307: warning: format not a string literal and no format arguments
make: *** [http11.o] Error 1

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out

Would you please help me?
Thank you in advance for your valuable time.

--
Luis Fernando Flores Oviedo
Project Management Professional No. 480222
Mobil: (449) 126 7789
"The only place success comes before work is in the dictionary." Vince Lombardi
Luis Lavena | 7 Nov 14:59
Picon
Gravatar

Re: mongrel_service gem for Ruby 1.9.1

On Sun, Nov 7, 2010 at 7:47 AM, Srinivasan Anand
<mail2sanand@...> wrote:
> Hi Luis,
>

Hello,

I'm forwarding this to mongrel-users list as others will benefit from
the responses.

> Greetings. This is regarding the mongrel_service gem related to the Ruby
> 1.9.x versions. As suggested in some blog, I have tried integrating the
> Daemon class(as attached) from Win32Utils gems but I feel, it all depends on
> Ruby 1.8.x versions coz I getting a msvcrt-ruby18.dll not found error.
>

Can you provide a link to that blog? mongrel_service do not use
win32-service or the daemon class since version 0.2 or something.

It instead have an executable that mimics a service and communicate
with the ruby child process.

Now, win32-service gem is binary linked against Ruby 1.8, you will
need to force the installation of the ruby version:

gem install win32-service --platform=ruby

But for that to work, you will also need to have RubyInstaller DevKit installed:

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

> I had to develop an application with Ruby - 1.9 and the corresponding rails
> - 2.3.5 and co, unfortunately in the Windows environment. Now, if I shift
> the Ruby version to 1.8.7(where I can use the mongrel_service gems for
> daemonizing the application), I may need to change a whole lot of code,
> which I would like to take it as the last option.
>
> Please do suggest me any other way we can do this. The ruby version and the
> gem list I am using is as below:
>

Please also install mongrel_service pre-release version too:

https://rubygems.org/gems/mongrel_service/versions/0.4.beta3

gem install mongrel_service --pre

mongrel_service do not depend on win32-service anymore

> vaio <at> VAIO-PC /g/Aptana_Workspace/sssmh
> $ ruby -v
> ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]
>
> ========================================================================================================
>
> vaio <at> VAIO-PC /g/Aptana_Workspace/sssmh
> $ gem list
>
> *** LOCAL GEMS ***
>
> actionmailer (2.3.5)
> actionpack (2.3.5)
> activerecord (2.3.5)
> activeresource (2.3.5)
> activesupport (2.3.8, 2.3.5)
> cgi_multipart_eof_fix (2.5.0)
> daemons (1.1.0)
> eventmachine (0.12.10)
> exception_string (0.1.2)
> fastthread (1.0.7)
> gem_plugin (0.2.3)
> mongrel (1.2.0.pre2 x86-mingw32)
> mysql (2.8.1 x86-mingw32)
> paperclip (2.3.3)
> rack (1.0.1)
> rails (2.3.5)
> rake (0.8.7)
> rdiscount (1.6.5)
> rubyw_helper (0.1.5)
> thin (1.2.7)
> win32-api (1.4.6)
> win32-service (0.7.1 x86-mswin32-60)
> windows-api (0.4.0)
> windows-pr (1.0.9)
>
> Please do guide me.
>
> Sairam and Regards,
> S. Anand
>
>

HTH,
--

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Wim Van es | 31 Oct 13:21

Mongrel don't render html if i use .htaccess

Hy,

Being new here i hope somebody  can help me.

Setup:

CentOS 5.5
ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-linux]
Rails 2.3.8
mongrel 1.1.5
rack 1.2.1, 1.0.1

Problem:

If i use a .htaccess like

RewriteEngine on

RewriteCond %{HTTP_HOST} ^my.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.my.domain.com$
RewriteRule ^(.*)$ "http\:\/\/127\.0\.0\.1\:12001\/$1" [P,L]

on a app what is using a DB i see only html source. Navigating to
my.domain.com:12001 works fine. When i make a app with a simple var in
the controller and a view that echo's this var i don't have any trouble.

What i have figured out:

In the mongrel log i found

Error calling Dispatcher.dispatch #<NameError: undefined local variable
or method `head' for #<Mongrel::CGIWrapper:0xb712ffa4>>
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:108:in
`send_cookies'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:136:in
`out'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_response.rb:65:in
`start'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/cgi.rb:135:in
`out'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:81:in
`process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in
`process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in
`each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in
`run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19

I edit mongrel/lib/mongrel/cgi.rb as described in
http://github.com/fauna/mongrel/blob/master/lib/mongrel/cgi.rb#L108

I found cookie's from my.domain.com in my browser

Can anyone point me in the right direction?

Thanks!

--

-- 
Posted via http://www.ruby-forum.com/.
Saratchand Kanuri | 22 Oct 14:17

Problem related to Caching in mongrel

My production server has 6 mongrels running. I hosted a CMS (content
management system) on the server. As a admin of the website, I delete
few tabs in the site. But the Public version(for the non-loggedin)
version of the site still shows the deleted tabs at random(some times
they show up and sometimes don't). I suppose that the cache at some of
the mongrels is not updated properly and that is why I can see the
deleted tabs. Is my supposition correct. Or am I missing something? Can
someone help me out. I am blocked on this right now.

Thanks in Advance,
-Saratchand

--

-- 
Posted via http://www.ruby-forum.com/.
Amit Tomar | 6 Oct 10:47

how do i cofigure in mongrel's http_request.rb

Hi all ,
              Am looking to configure mongrels's http_request.rb in
order to
delete mongrel temporary file after upload .This is what i would like to
have

def initialize(params, socket, dispatchers)
      @params = params
      @socket = socket
      @dispatchers = dispatchers
      content_length = @params[Const::CONTENT_LENGTH].to_i
      remain = content_length - @params.http_body.length

      # tell all dispatchers the request has begun
      @dispatchers.each do |dispatcher|
        dispatcher.request_begins(@params)
      end unless @dispatchers.nil? || @dispatchers.empty?

      # Some clients (like FF1.0) report 0 for body and then send a
body.  This will probably truncate them but at least the request goes
through usually.
      if remain <= 0
        # we've got everything, pack it up
        @body = StringIO.new
        @body.write @params.http_body
        update_request_progress(0, content_length)
      elsif remain > 0
        # must read more data to complete body
        if remain > Const::MAX_BODY
          # huge body, put it in a tempfile
          @body = Tempfile.new(Const::MONGREL_TMP_BASE)
          @body.binmode
        else
          # small body, just use that
          @body = StringIO.new
        end

        @body.write @params.http_body
        read_body(remain, content_length)
      end

      @body.rewind if @body
    end

Here i would like to close this @body after use by using something like
@body.close but while doing so am getting error what should i do and
whre should i call this @body.close
--

-- 
Posted via http://www.ruby-forum.com/.
Amit Tomar | 4 Oct 15:45

Found memory leakage in Mongrel

Hii ALL,
         Running ruby 1.8.6 (2007-09-24 patchlevel 111)
[i386-mswin32],Mongerl 1.1.5.

Scenario /Observation : While uploading some large files,i Found memory
leakage in mongrel.I start uploading large file what happen is files is
being copied to mongerl temp file, from mongrel temp files to ruby temp
file (cgi file) and then to actual location where i indend to...after
upload complete ,after few seconds ruby temp files is collected(garbase
collection)but mongrel temp file is still hanging in memory. I tried to
upload again same procedure happens,This time after few seconds  ruby
temp files is collected +
mongerl previous temp files is collected but the latest mongrel temp
file is still there.

                 What i would like to know is there any issue with
mongrel ,if it is plzz let me know

Thanks
--

-- 
Posted via http://www.ruby-forum.com/.

Gmane