Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    @jeffreycastro could you pleas give us some more infos? what is "records" and why is it selecting on "users"?
    @BobbyMcWho The adapter uses no tables, its your code which accesses tables.
    Jeffrey M Castro
    @KDGundermann thanks for taking time to read my message, i will get back to you on this tomorrow :)
    Jeffrey M Castro

    @KDGundermann I think the reason is the "includes" vs "left_joins".
    Device.left_joins(:health_records).order('health_records.error_number desc').page(1).limit(10).count returns 10

    Device.includes(:health_records).order('health_records.error_number desc').page(1).limit(10).count returns 3

    the only difference is includes and left_joins in the queries above. can you explain to me why?
    Jeffrey M Castro
    i think i got it now.
    used left_joins and subqueries + select to be able to order properly.
    Tushar Pal
    Hi anyone here
    how is going the progress to run this gem on rails 5.2?
    running ruby 2.4.0 and following a tutorial. Getting undefined method `alias_method_chain' for #<Class:ActiveRecord::Base> (NoMethodError) Everytime I require this gem
    ok nvm
    figured it out. I had to clear my local gemset in rvm and lock my active record to ~>5.1
    then install the other gems
    I need to set up a connection with sql server 2008 in rails
    all I want to make is a direct sql connection that I can write sql queries
    I have the database credentials
    would need 1. set up the database connection, 2. sql interface to database
    Benjamin Fleischer
    Going from version 4.2.18 to 5.0.8 (We're of course also upgrading Rails) has broker finder behavior on a table with multiple primary keys, and I'm not sure how to address it. For exampleMyRecord.where(field_name: value).take now fails with ActiveRecord::StatementInvalid:
    TinyTds::Error: Invalid column name '"TicketNo", "UniqueID", "ItemNo"'.: EXEC sp_executesql N'SELECT [Tkscale].* FROM [Tkscale] WHERE [Tkscale].[TicketNo] = @0 ORDER BY [Tkscale].["TicketNo", "UniqueID", "ItemNo"] ASC OFFSET 0 ROWS FETCH NEXT @1 ROWS ONLY', N'@0 nvarchar(max), @1 int', @0 = N'10234770', @1 = 1 which is odd since I didn't ask for the ordering. I'm not sure how to fix this. I have set MyRecord.table_name = 'Tkbatch' and MyRecord.primary_key = :UniqueId. MyRecord.connection.schema_cache.primary_keys("Tkbatch") returns ["TicketNo", "UniqueID", "ItemNo"]. I can't find an issue or in the code where this should be addressed. any ideas?
    I could get around it by setting a default scope with an order but that's kind of a workaround
    Benjamin Fleischer
    @metaskills --^
    I'm just starting out and learning a lot. Is this supported by the latest Active Record?
    John Paul Bamberg
    I'm running ubuntu. The rails 4 app with my config worked on my mac. I'm getting an error:
    "Unable Adaptive Server connection failed (servername.database.secure.windows.net:1433)"
    tiny_tds (2.1.2) lib/tiny_tds/client.rb:60:in 'connect'
    tiny_tds (2.1.2) lib/tiny_tds/client.rb:60:in 'initialize'
    If I look at the username of the opts being passed to connect is has the wrong username. There was an @server automatically appended to it. I don't know if that is what the problem might be?
    Please help. I've been stuck on this for dayyyyssss
    Hello, Wanted to check if there are plans to upgrade openssl to latest version as default i.e 1.1.0f
    Corey Vincent
    Hello I'm trying to connect to a Sql Server that is on a remote windows server, using ruby. I've tried using the gem tiny_tds, but I keep getting a connect server name not founderror. I'm thinking this is just for connecting to a local sql server, and not one that is on a completely different machine. Can anyone point me in the right direction?
    Vincent Smith

    Perhaps I'm missing something, is there a way to define an Identity column that is not a primary key?

    I am working with a legacy database which has some non-PK identity columns. When a performed a schema dump against our development database nothing seems to indicate that these columns are to be auto incremented.

    Oliver Miehe
    Hi, we want to use Ruby 2.6 and tiny_tds is currently only running with 2.5. Do you already know a timeline when we can expect Support for 2.6?
    Thx in advance!
    Eduardo J Moreno M
    I'm working with Windows 10, Ruby 2.6 and already tryed to install tiny_tds with gem install --platform ruby tiny_tds without success. I saw that currently there isn't ruby 2.6 support for this gem. Any workaround so far?
    Rafael Vicente Saura
    hello I have a doubt I need a non relational database for now I am using mongodb and I am happy with it but sql has taken filetables that allows the use of files in the sql Which is better?
    Rob Widmer
    @metaskills We're making an effort to support mssql in jruby and we currently have 2 different approaches that we're trying and we need some input from this project as to what makes sense long term
    I think the preferred method is to have a wrapper around the ActiveRecord-sqlserver-adapter gem that just takes care of the driver specifics, i.e. jruby/activerecord-jdbc-adapter#1008
    But that depends on us being able to get some changes into activerecord-sqlserver-adapter and knowing that there will be support long term
    The other option that has been proposed is basically a fork of the activerecord-sqlserver-adapter into the activerecord-jdbc-adapter gem i.e. jruby/activerecord-jdbc-adapter#1007
    Rob Widmer
    I think it is beneficial for both projects in the long term to go with the first option because then we don't have 2 entirely different implementations of the core of the adapter, but if you think it will be too much work to make it happen, then we can go the "fork" route
    vipul Aggarwal
    is anyone working on this project these days?
    And is @metaskills around?
    folks, re-iterating Eduardo's question above. Any help for installing this for ruby 2.6 ?
    Benjamin Fleischer
    we have it working on Ruby 2.6
    it works fine, no?
    on windows 10 ?
    so still cimplains
    I mean it still complains about being incompatible with ruby 2.6
    yassine ben gharsallah
    Hello guys i have some questions about an sql query could you help me ?
    Hi guys, does this gem work with jdbc as well, or do I have to use 'activerecord-jdbcmssql-adapter' instead?
    Rob Widmer
    Hi @podsi, It depends what version of active record you are using, if you are 4.2 or lower you can use the activerecord-jdbcmssql-adapter gem, 5 or above, we're hoping to have an activerecord-jdbcsqlserver-adapter gem released before rubyconf
    Hi @rdubya, thx for your fast response, we are using activerecord 5.2.3, so I am looking forward to the release!