Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to fetch tables information from ... #128

Open
adasfan opened this issue Feb 25, 2013 · 56 comments
Open

Unable to fetch tables information from ... #128

adasfan opened this issue Feb 25, 2013 · 56 comments

Comments

@adasfan
Copy link

adasfan commented Feb 25, 2013

I am trying to pull a db from MySQL into Postgres. "blogs" is the name of the one the tables in the db.

I see the error "Unable to fetch tables information from http://mcetin:secret@localhost:5000. Please check the server log" error message from the taps pull side.

Here is the call stack from the taps server side:
localhost - - [24/Feb/2013:23:00:47 EST] "GET /sessions/8471611000/pull/table_names HTTP/1.1" 500 518

  • -> /sessions/8471611000/pull/table_names
    Rack::Utils::OkJson::Error - cannot encode Symbol: :blogs:
    /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/utils/okjson.rb:427:in valenc' /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/utils/okjson.rb:438:inblock in arrenc'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/utils/okjson.rb:438:in map' /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/utils/okjson.rb:438:inarrenc'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/utils/okjson.rb:410:in encode' /.../.rvm/gems/ruby-1.9.3-p362/gems/taps-0.3.24/lib/taps/server.rb:157:inblock in class:Server'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:865:in call' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:865:inblock in route'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:521:in instance_eval' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:521:inroute_eval'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:500:in block (2 levels) in route!' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:497:incatch'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:497:in block in route!' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:476:ineach'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:476:in route!' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:601:indispatch!'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:411:in block in call!' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininstance_eval'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:566:in block in invoke' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:566:incatch'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:566:in invoke' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:411:incall!'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:399:in call' /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/deflater.rb:25:incall'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/auth/basic.rb:25:in call' /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:incall'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:979:in block in call' /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:1005:insynchronize'
    /.../.rvm/gems/ruby-1.9.3-p362/gems/sinatra-1.0/lib/sinatra/base.rb:979:in call' /.../.rvm/gems/ruby-1.9.3-p362/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:inservice'
    /.../.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /.../.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun'
    /.../.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
    ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol: :blogs
@nsoufr
Copy link

nsoufr commented Feb 28, 2013

same problem here !

@jpwynn
Copy link

jpwynn commented Mar 4, 2013

FWIW I had a similar error:

ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol: :schema_migrations

I was running the taps command from a directory one level up from my app and was using my global gem set. My app is rails 3.1.3, and uses rmv to manage the gem set. So running one level up would have been using my global gemset.

Anyway, when I re-ran taps server and taps pull from inside my project directory, it worked fine.

@drshizzle
Copy link

Same problem here! Didn't work from inside my project directory either :(

localhost - - [09/Mar/2013:06:13:21 EST] "GET /sessions/9685932778/pull/table_names HTTP/1.1" 500 529

  • -> /sessions/9685932778/pull/table_names
    OkJson::Error - cannot encode Symbol: :Audio:

@egilburg
Copy link

I just had the same issue and solved it by using exactly the gem versions specified in gemspec, rather than latest version allowed by gemspec. It seems that one of the gems had a regression and taps didn't update gemspec to exclude that version.

@charliewilkins
Copy link

Appears to work with rack 1.0.1
gem "rack", "1.0.1"

@chadkouse
Copy link

@flingbob this fixed the problem for me.. thanks for the tip.

@cheeby
Copy link

cheeby commented Mar 27, 2013

What version of rails are you using? My app won't let me downgrade that far ...

Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rails (= 3.2.11) ruby depends on
      rack (~> 1.4.0) ruby

    rack (1.0.1)

@egilburg
Copy link

Are you adding this to your Rails app's Gemfile? You don't have to, unless your Rails app depends on it during runtime (which I'd find unusual). Taps doesn't require Rails.

@cheeby
Copy link

cheeby commented Mar 27, 2013

ok, cool. Then from the command line how do I get taps to use a specific version of rack?

Thanks!

Steve

On Mar 27, 2013, at 3:58 PM, Eugene Gilburg notifications@github.com wrote:

Are you adding this to your Rails app's Gemfile? You don't have to, unless your Rails app depends on it during runtime (which I'd find unusual). Taps doesn't require Rails.


Reply to this email directly or view it on GitHub.

@egilburg
Copy link

Run the command from a new folder not under Rails root, and add a separate Gemfile there?

@cheeby
Copy link

cheeby commented Mar 27, 2013

Hi again,

Yeah, tried that:

wiscota :: ~/ruby/temp 1 » cat Gemfile
source 'https://rubygems.org'
gem 'rack', '1.5.0'

then ran bundle
then ran the taps pull and got the same error.

How is it currently working for you? What's your set-up look like?

Thanks.

Steve

On Mar 27, 2013, at 4:03 PM, Eugene Gilburg notifications@github.com wrote:

Run the command from a new folder not under Rails root, and add a separate Gemfile there?


Reply to this email directly or view it on GitHub.

@egilburg
Copy link

Change rack to 1.0.1 in that Gemfile you just created

On Wed, Mar 27, 2013 at 2:15 PM, steve fox notifications@github.com wrote:

Hi again,

Yeah, tried that:

wiscota :: ~/ruby/temp 1 » cat Gemfile
source 'https://rubygems.org'
gem 'rack', '1.5.0'

then ran bundle
then ran the taps pull and got the same error.

How is it currently working for you? What's your set-up look like?

Thanks.

Steve

On Mar 27, 2013, at 4:03 PM, Eugene Gilburg notifications@github.com
wrote:

Run the command from a new folder not under Rails root, and add a
separate Gemfile there?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/128#issuecomment-15553618
.

@cheeby
Copy link

cheeby commented Mar 27, 2013

Same error:

ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol: :brands

Tried with ruby 1.9.2 and 1.9.3.

Thanks,

Steve

On Mar 27, 2013, at 5:53 PM, Eugene Gilburg notifications@github.com wrote:

Change rack to 1.0.1 in that Gemfile you just created

On Wed, Mar 27, 2013 at 2:15 PM, steve fox notifications@github.com wrote:

Hi again,

Yeah, tried that:

wiscota :: ~/ruby/temp 1 » cat Gemfile
source 'https://rubygems.org'
gem 'rack', '1.5.0'

then ran bundle
then ran the taps pull and got the same error.

How is it currently working for you? What's your set-up look like?

Thanks.

Steve

On Mar 27, 2013, at 4:03 PM, Eugene Gilburg notifications@github.com
wrote:

Run the command from a new folder not under Rails root, and add a
separate Gemfile there?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/128#issuecomment-15553618
.


Reply to this email directly or view it on GitHub.

@cheeby
Copy link

cheeby commented Mar 28, 2013

Any other suggestions?

Thanks,

Steve

On Mar 27, 2013, at 6:57 PM, Steve Fox steve@wiscota.com wrote:

Same error:

ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol: :brands

Tried with ruby 1.9.2 and 1.9.3.

Thanks,

Steve

On Mar 27, 2013, at 5:53 PM, Eugene Gilburg notifications@github.com wrote:

Change rack to 1.0.1 in that Gemfile you just created

On Wed, Mar 27, 2013 at 2:15 PM, steve fox notifications@github.com wrote:

Hi again,

Yeah, tried that:

wiscota :: ~/ruby/temp 1 » cat Gemfile
source 'https://rubygems.org'
gem 'rack', '1.5.0'

then ran bundle
then ran the taps pull and got the same error.

How is it currently working for you? What's your set-up look like?

Thanks.

Steve

On Mar 27, 2013, at 4:03 PM, Eugene Gilburg notifications@github.com
wrote:

Run the command from a new folder not under Rails root, and add a
separate Gemfile there?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/128#issuecomment-15553618
.


Reply to this email directly or view it on GitHub.

@egilburg
Copy link

Sorry, not sure then. Perhaps try using other exact gem versions as I posted earlier. If not, can't help you, sorry

@cheeby
Copy link

cheeby commented Mar 28, 2013

ok. Thanks.

On Mar 28, 2013, at 2:52 PM, Eugene Gilburg notifications@github.com wrote:

Sorry, not sure then. Perhaps try using other exact gem versions as I posted earlier. If not, can't help you, sorry


Reply to this email directly or view it on GitHub.

@Ansh25
Copy link

Ansh25 commented Apr 2, 2013

This worked for me.

  1. I went up one directory from my project directory then did the following
  2. gem install taps
  3. gem uninstall rack
  4. gem install rack --version 1.0.1

Then did the migration as before and it worked. I had rack 1.5.2 installed so I had to remove that and replace it with rack 1.0.1. I also reversed the above process once I was done to restore my gem versions to original state. I'm using ruby 2.0.0-p0 and rails 4.0.0.beta1

@cheeby
Copy link

cheeby commented Apr 2, 2013

No luck. Followed your steps. I even created an empty Gemfile in there and added

gem 'rack','1.0.1'

and ran bundle.

I may check out options other than taps to pull this off, but will keep working on this, too.

Thanks,

Steve

On Apr 1, 2013, at 7:10 PM, Ansh25 notifications@github.com wrote:

This worked for me.

  1. I went up one directory from my project directory then did the following
  2. gem install taps
  3. gem uninstall rack
  4. gem install rack --version 1.0.1

Then did the migration as before and it worked. I had rack 1.5.2 installed so I had to remove that and replace it with rack 1.0.1. I also reversed the above process once I was done to restore my gem versions to original state. I'm using ruby 2.0.0-p0 and rails 4.0.0.beta1


Reply to this email directly or view it on GitHub.

@cameronbot
Copy link

@cheeby I encountered this issue as well. Starting with @Ansh25 's advice, I moved up a directory and created a new Gemfile with this:

gem 'rack','1.0.1'
gem 'taps'
gem 'sqlite3'
gem 'pg'

At first I tried just specifying rack, but taps was already configured with rack 1.5, so I added taps to my new gemfile. You also need to add the gems for the database drivers. For me I was migrating sqlite to pg. Once I bundle installed with this gemfile I was able to restart taps and run the pull. Hope that helps.

@admbtlr
Copy link

admbtlr commented May 7, 2013

@Ansh25 Worked perfectly - thanks!

@hector
Copy link

hector commented May 13, 2013

rack 1.5.2 was not working for me with the same error.
I uninstalled it and installed back rack version 1.2.5 and it worked.

@cheeby
Copy link

cheeby commented May 15, 2013

Weird. On a completely different machine - brand new iMac - I've rebuilt the database, created a fresh postgresql database and then created a Gemfile in a new directory, added the items specified by @cameronbot and am getting the same error on doing a taps pull:

ERROR: Rack::Utils::OkJson::Error: cannot encode Symbol: :brands

Any other insight is appreciated.

Thanks,

Steve

@bewinter
Copy link

@Ansh25 Thanks as well for your workaround! Worked perfectly!

@Paxa
Copy link

Paxa commented May 26, 2013

I added gem 'rack','1.0.1' to beginning of bin/taps, works well. Thank you

@kainage
Copy link

kainage commented Jun 20, 2013

@Paxa worked for me as well. Thanks.

@ZenCocoon
Copy link

@Ansh25 worked great for me as well, thanks.

eric1234 added a commit to eric1234/taps that referenced this issue Jul 12, 2013
Taps uses a customized version of OkJson to exchange data between the client
and server. This customized version silently converts symbols to strings
as a convience (the original OkJson considers encoding symbols an error since
symbols are not a type supported by JSON).

Rack started using OkJson also to encode data but kept the original symantics.
Since the Taps::Server inherits from Sinatra::Base, and Sinatra::Base includes
Rack::Utils, and Rack::Utils is the namespace where Rack's version of OkJson
is installed this means the Rack version is now being used by taps instead of
the taps version. This means when symbols are encoded an error is generated.

To restore the original behavior this patch explicility references the taps
version of OkJson.

This fixes issue ricardochimal#128.
@hak8or
Copy link

hak8or commented Jul 16, 2013

This still does not seem to be fixed that well if you get the gem from rubydocs.

Here is what I did:

get out of your rails folder and make a folder called tmp.

cd temp

make a Gemfile containing and save it:

Put the following into the gemfile

source 'https://rubygems.org'

gem 'rack','1.0.1'
gem 'taps'
gem 'sqlite3'
gem 'pg'

run bundle from a terminal within that folder, which should give you results like this:

hak8or@ubuntu:~/tmp$ bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using mime-types (1.23)
Using pg (0.15.1)
Installing rack (1.0.1)
Using rest-client (1.6.7)
Using sequel (3.20.0)
Using sinatra (1.0)
Using sqlite3 (1.3.7)
Installing taps (0.3.24)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

Copy the db folder from your rails application into your tmp folder, so now the folder contents should look like this:

Gemfile
Gemfile.lock
db

Now from the terminal within that folder run what you were doing earlier but add bundle exec. You should get something like this:

hak8or@ubuntu:~/tmp$ bundle exec taps server sqlite://db/development.sqlite3 hak8or secret
== Sinatra/1.0 has taken the stage on 5000 for production with backup from WEBrick
[2013-07-16 11:10:32] INFO  WEBrick 1.3.1
[2013-07-16 11:10:32] INFO  ruby 2.0.0 (2013-06-27) [x86_64-linux]
[2013-07-16 11:10:32] INFO  WEBrick::HTTPServer#start: pid=3765 port=5000

And from that point run everything like you would normally and it should work fine. This is what fixed it for me.

@MaxCloutier
Copy link

@hak8or Worked perfectly for me, thanks a lot

@MCodyB
Copy link

MCodyB commented Sep 18, 2013

@hak8or Thanks so much.

@hak8or
Copy link

hak8or commented Sep 19, 2013

@MaxCloutier @zakstern @MCodyB You are all most welcome! :)

@josephchan91
Copy link

@Ansh25 Thank you!!!

@Amephist
Copy link

@cameronbot & @hak8or thank you!!

wijet pushed a commit to wijet/taps that referenced this issue Oct 21, 2013
Taps uses a customized version of OkJson to exchange data between the client
and server. This customized version silently converts symbols to strings
as a convience (the original OkJson considers encoding symbols an error since
symbols are not a type supported by JSON).

Rack started using OkJson also to encode data but kept the original symantics.
Since the Taps::Server inherits from Sinatra::Base, and Sinatra::Base includes
Rack::Utils, and Rack::Utils is the namespace where Rack's version of OkJson
is installed this means the Rack version is now being used by taps instead of
the taps version. This means when symbols are encoded an error is generated.

To restore the original behavior this patch explicility references the taps
version of OkJson.

This fixes issue ricardochimal#128.
@sullysaurus
Copy link

@Ansh25 Worked, thank you for ending days of aggravation.

@alagram
Copy link

alagram commented Nov 15, 2013

You can add add gem 'rack',’1.0.1’ to gemfile and run bundle update rack. This worked for me. Thanks guys.

@JGrubb
Copy link

JGrubb commented Nov 22, 2013

@alagram's suggestion worked for me. thanks!

@idejuan
Copy link

idejuan commented Dec 17, 2013

I have tried @hak8or but when I run taps from the temp/ folder I see that rack is still on version 1.5.2 which is the latest version I have installed.

In the Gemfile.lock it is clear

$ cat Gemfile.lock 
GEM
  remote: https://rubygems.org/
  specs:
    mime-types (2.0)
    pg (0.15.1)
    rack (1.0.1)
    rest-client (1.6.7)
      mime-types (>= 1.16)
    sequel (3.20.0)
    sinatra (1.0)
      rack (>= 1.0)
    sqlite3 (1.3.8)
    taps (0.3.24)
      rack (>= 1.0.1)
      rest-client (>= 1.4.0, < 1.7.0)
      sequel (~> 3.20.0)
      sinatra (~> 1.0.0)

PLATFORMS
  ruby

DEPENDENCIES
  pg (= 0.15.1)
  rack (= 1.0.1)
  sqlite3
  taps

But when I run taps

$ taps server sqlite://db/development.sqlite3 root root
== Sinatra/1.0 has taken the stage on 5000 for production with backup from WEBrick
[2013-12-17 17:12:00] INFO  WEBrick 1.3.1
[2013-12-17 17:12:00] INFO  ruby 2.0.0 (2013-06-27) [x86_64-darwin12.3.0]
[2013-12-17 17:12:00] INFO  WEBrick::HTTPServer#start: pid=5544 port=5000
127.0.0.1 - root [17/Dec/2013 17:12:08] "GET / HTTP/1.1" 200 - 0.0012
localhost - - [17/Dec/2013:17:12:08 CET] "GET / HTTP/1.1" 200 31
- -> /
127.0.0.1 - root [17/Dec/2013 17:12:08] "POST /sessions HTTP/1.1" 200 - 0.0051
localhost - - [17/Dec/2013:17:12:08 CET] "POST /sessions HTTP/1.1" 200 46
- -> /sessions
Rack::Utils::OkJson::Error - cannot encode Symbol: :schema_migrations:
 /Users/idejuan/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/utils/okjson.rb:427:in `valenc'

As you can see, rack is on version 1.5.2

If I see what versions of rack I have installed,

$ gem uninstall 'rack'

Select gem to uninstall:
 1. rack-1.0.1
 2. rack-1.4.4
 3. rack-1.4.5
 4. rack-1.5.2
 5. All versions
> 

But I would not like to uninstall other versions, since I fear this could affect other projects I have in the same machine...

Is there anyway I can enforce taps to use rack 1.0.1?

thank you for your help

-- UPDATE --

Ok I just found the solution, use bundle exec before the command taps

bundle exec taps server sqlite://db/development.sqlite3 root root

@martinvelez
Copy link

@Ansh25 Your suggestion worked for me as well. Thanks!

@hak8or
Copy link

hak8or commented Jan 25, 2014

@idejuan

Very late, but I figured I would update my fix and do some formatting with your information.

@ssosina
Copy link

ssosina commented Feb 6, 2014

@Ansh25 Your solution works a charm. Cheers!

@Chryus
Copy link

Chryus commented Feb 21, 2014

Added gem 'rack','1.0.1' to beginning of bin/taps. This worked like a charm. Thank you.

@zezantam
Copy link

@hak8or thanks! worked well for me!

@logan99
Copy link

logan99 commented May 23, 2014

I tried every possible way to do this, but everytime I am having the same problem
Failed to connect to database:
Sequel::DatabaseConnectionError -> PG::ConnectionBad: fe_sendauth: no password supplied

I tried to follow hak8or advice
The gem file looks same as that of hak8or but the gemfile.lock give different versions of the the gem installed. Any fullproof solution to the problem?

I am using rails 4.1 and ruby 2.1.1

@emaillenin
Copy link

@Paxa's solution is the easiest

  • gem install rack --version 1.0.1
  • Add gem 'rack','1.0.1' to bin/taps

@asciant
Copy link

asciant commented Aug 25, 2014

@hak8or thanks a million! worked brilliantly for me.

@ghost
Copy link

ghost commented Aug 25, 2014

@hak8or Worked like charm! Thanks!

@joelbarker2011
Copy link

Another thanks to @hak8or !

@sibor94
Copy link

sibor94 commented Dec 18, 2014

@hak8or Thank you so much

@Ligerlilly
Copy link

@hak8or Thanks!

@joshco
Copy link

joshco commented Feb 20, 2015

@Paxa what does this mean?

Add gem 'rack','1.0.1' to bin/taps

taps is a ruby script, adding that line is a syntax error.

@Paxa
Copy link

Paxa commented Feb 20, 2015

@joshco, this will make rubygems load rack version 1.0.1, otherwise it will load latest version of gem installed on machine

@joshco
Copy link

joshco commented Feb 20, 2015

This still doesn't make sense. bin/taps is a ruby script. You can't put a gem statement inside a ruby script. Do you mean to say put that in your Gemfile?

@Paxa
Copy link

Paxa commented Feb 20, 2015

@joshco gem as a function, not a statement. you can try open irb and type gem

@joshco
Copy link

joshco commented Feb 20, 2015

ah. my bad.
Though I still haven't figured this out, for the postgres password errors
i made some progress by adjusting my postgres pg_hba.conf. It seems that loosening the ACLs is important.

@Paxa
Copy link

Paxa commented Feb 20, 2015

May be there is a better tool, did you see http://pgloader.io/ ?

@joshco
Copy link

joshco commented Feb 20, 2015

Ah. thanks for the tip. I will try it

On Fri, Feb 20, 2015 at 12:58 PM, Pavel notifications@github.com wrote:

May be there is a better tool, did you see http://pgloader.io/ ?

Reply to this email directly or view it on GitHub
#128 (comment).

_Josh Co_hen joshco@gmail.com | @joshco | LinkedIn
http://linkedin.com/in/joshrcohen/ | GitHub https://github.com/joshco
| OSDI opensupporter.org http://opensupporter.org/
"If [OSDI http://opensupporter.org/] succeeds, it could usher in the next
chapter in political technology." - Washington Post http://wapo.st/1hYXX7O

In the LGBT community, Domestic Abuse is the friendly-fire equivalent of
bullying, sexual assault, discrimination, Religion based bigotry and other
types of subjugation.

Let's stop it. Please help
https://www.crowdrise.com/avpchamps-friends/fundraiser/joshcohen2

joelvh pushed a commit to joelvh/taps2 that referenced this issue Mar 29, 2017
Taps uses a customized version of OkJson to exchange data between the client
and server. This customized version silently converts symbols to strings
as a convience (the original OkJson considers encoding symbols an error since
symbols are not a type supported by JSON).

Rack started using OkJson also to encode data but kept the original symantics.
Since the Taps::Server inherits from Sinatra::Base, and Sinatra::Base includes
Rack::Utils, and Rack::Utils is the namespace where Rack's version of OkJson
is installed this means the Rack version is now being used by taps instead of
the taps version. This means when symbols are encoded an error is generated.

To restore the original behavior this patch explicility references the taps
version of OkJson.

This fixes issue ricardochimal#128.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests