(PG::UndefinedObject: ERROR: type “hstore” does not exist) in rails production Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Cannot simply use PostgreSQL table name (“relation does not exist”)Check if a table exists in RailsPostgreSQL error: Fatal: role “username” does not existError with Rails test database using postgres using hstorepsql: FATAL: database “<user>” does not existGetting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with railsPG::UndefinedObject: ERROR: type “hstore” does not exist but it doesCannot add hstore column to multitenant rails 4 applicaiton (postgres schema based)PhpStorm - ERROR: type “hstore” does not existSqlalchemy : Type geoalchemy2 does not exist

How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?

macOS: Name for app shortcut screen found by pinching with thumb and three fingers

Do wooden building fires get hotter than 600°C?

The Nth Gryphon Number

What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

How could we fake a moon landing now?

Is multiple magic items in one inherently imbalanced?

Sum letters are not two different

Trademark violation for app?

How to write capital alpha?

What initially awakened the Balrog?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Is there any word for a place full of confusion?

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

What do you call the main part of a joke?

What does 丫 mean? 丫是什么意思?

Tannaka duality for semisimple groups

Putting class ranking in CV, but against dept guidelines

Karn the great creator - 'card from outside the game' in sealed

What to do with repeated rejections for phd position

Converted a Scalar function to a TVF function for parallel execution-Still running in Serial mode

In musical terms, what properties are varied by the human voice to produce different words / syllables?

What is the difference between a "ranged attack" and a "ranged weapon attack"?



(PG::UndefinedObject: ERROR: type “hstore” does not exist) in rails production



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Cannot simply use PostgreSQL table name (“relation does not exist”)Check if a table exists in RailsPostgreSQL error: Fatal: role “username” does not existError with Rails test database using postgres using hstorepsql: FATAL: database “<user>” does not existGetting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with railsPG::UndefinedObject: ERROR: type “hstore” does not exist but it doesCannot add hstore column to multitenant rails 4 applicaiton (postgres schema based)PhpStorm - ERROR: type “hstore” does not existSqlalchemy : Type geoalchemy2 does not exist



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have a element with type hstore, during the migration for schema it does not work even though the database is enabled with hstore extension.I get a (PG::UndefinedObject: ERROR: type "hstore" does not exist) error during migration. This work perfectly in local. How to make it effect across all schema?










share|improve this question






























    0















    I have a element with type hstore, during the migration for schema it does not work even though the database is enabled with hstore extension.I get a (PG::UndefinedObject: ERROR: type "hstore" does not exist) error during migration. This work perfectly in local. How to make it effect across all schema?










    share|improve this question


























      0












      0








      0








      I have a element with type hstore, during the migration for schema it does not work even though the database is enabled with hstore extension.I get a (PG::UndefinedObject: ERROR: type "hstore" does not exist) error during migration. This work perfectly in local. How to make it effect across all schema?










      share|improve this question
















      I have a element with type hstore, during the migration for schema it does not work even though the database is enabled with hstore extension.I get a (PG::UndefinedObject: ERROR: type "hstore" does not exist) error during migration. This work perfectly in local. How to make it effect across all schema?







      ruby-on-rails postgresql digital-ocean






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 22 at 11:02







      Abhishek Aravindan

















      asked Mar 22 at 10:52









      Abhishek AravindanAbhishek Aravindan

      1099




      1099






















          2 Answers
          2






          active

          oldest

          votes


















          1














          That extension is most likely located in schema outside of search_path for the user that is used in query that gave you error.
          You can fix it either by recreating extension in public schema:



          CREATE EXTENSION hstore WITH SCHEMA public;


          Note that it is possible to change default setting and not have public in search_path.



          Or adding to search_path schema that has hstore located at:



          ALTER ROLE your_role_name
          SET search_path = public, your_role_name, some_schema_with_hstore_extension;


          This requires new connection to take effect. You can also use SET search_path ... in session to have immediate effect for that session only. I do not remember at the moment if permissions are required for your_role_name to schema some_schema_with_hstore_extension and hstore objects within it; most likely it is required, but might already be granted.






          share|improve this answer






























            0














            To create extension in your database, you have to explicitly connect to that database. So, if your database is my_app_development, you have to do :



            sudo -u postgres psql my_app_development
            create extension hstore;


            Also, you do not tell which rails version you're on. If you're not on rails-4, you will have to use the postgres hstore gem.






            share|improve this answer

























            • ERROR: extension "hstore" already exists when i ran the above command... :(

              – Abhishek Aravindan
              Mar 22 at 11:09











            • I have updated my answer.

              – Umar Khan
              Mar 22 at 11:21











            • i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

              – Abhishek Aravindan
              Mar 22 at 11:37












            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55298040%2fpgundefinedobject-error-type-hstore-does-not-exist-in-rails-production%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            That extension is most likely located in schema outside of search_path for the user that is used in query that gave you error.
            You can fix it either by recreating extension in public schema:



            CREATE EXTENSION hstore WITH SCHEMA public;


            Note that it is possible to change default setting and not have public in search_path.



            Or adding to search_path schema that has hstore located at:



            ALTER ROLE your_role_name
            SET search_path = public, your_role_name, some_schema_with_hstore_extension;


            This requires new connection to take effect. You can also use SET search_path ... in session to have immediate effect for that session only. I do not remember at the moment if permissions are required for your_role_name to schema some_schema_with_hstore_extension and hstore objects within it; most likely it is required, but might already be granted.






            share|improve this answer



























              1














              That extension is most likely located in schema outside of search_path for the user that is used in query that gave you error.
              You can fix it either by recreating extension in public schema:



              CREATE EXTENSION hstore WITH SCHEMA public;


              Note that it is possible to change default setting and not have public in search_path.



              Or adding to search_path schema that has hstore located at:



              ALTER ROLE your_role_name
              SET search_path = public, your_role_name, some_schema_with_hstore_extension;


              This requires new connection to take effect. You can also use SET search_path ... in session to have immediate effect for that session only. I do not remember at the moment if permissions are required for your_role_name to schema some_schema_with_hstore_extension and hstore objects within it; most likely it is required, but might already be granted.






              share|improve this answer

























                1












                1








                1







                That extension is most likely located in schema outside of search_path for the user that is used in query that gave you error.
                You can fix it either by recreating extension in public schema:



                CREATE EXTENSION hstore WITH SCHEMA public;


                Note that it is possible to change default setting and not have public in search_path.



                Or adding to search_path schema that has hstore located at:



                ALTER ROLE your_role_name
                SET search_path = public, your_role_name, some_schema_with_hstore_extension;


                This requires new connection to take effect. You can also use SET search_path ... in session to have immediate effect for that session only. I do not remember at the moment if permissions are required for your_role_name to schema some_schema_with_hstore_extension and hstore objects within it; most likely it is required, but might already be granted.






                share|improve this answer













                That extension is most likely located in schema outside of search_path for the user that is used in query that gave you error.
                You can fix it either by recreating extension in public schema:



                CREATE EXTENSION hstore WITH SCHEMA public;


                Note that it is possible to change default setting and not have public in search_path.



                Or adding to search_path schema that has hstore located at:



                ALTER ROLE your_role_name
                SET search_path = public, your_role_name, some_schema_with_hstore_extension;


                This requires new connection to take effect. You can also use SET search_path ... in session to have immediate effect for that session only. I do not remember at the moment if permissions are required for your_role_name to schema some_schema_with_hstore_extension and hstore objects within it; most likely it is required, but might already be granted.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 22 at 13:15









                Łukasz KamińskiŁukasz Kamiński

                3,3941819




                3,3941819























                    0














                    To create extension in your database, you have to explicitly connect to that database. So, if your database is my_app_development, you have to do :



                    sudo -u postgres psql my_app_development
                    create extension hstore;


                    Also, you do not tell which rails version you're on. If you're not on rails-4, you will have to use the postgres hstore gem.






                    share|improve this answer

























                    • ERROR: extension "hstore" already exists when i ran the above command... :(

                      – Abhishek Aravindan
                      Mar 22 at 11:09











                    • I have updated my answer.

                      – Umar Khan
                      Mar 22 at 11:21











                    • i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                      – Abhishek Aravindan
                      Mar 22 at 11:37
















                    0














                    To create extension in your database, you have to explicitly connect to that database. So, if your database is my_app_development, you have to do :



                    sudo -u postgres psql my_app_development
                    create extension hstore;


                    Also, you do not tell which rails version you're on. If you're not on rails-4, you will have to use the postgres hstore gem.






                    share|improve this answer

























                    • ERROR: extension "hstore" already exists when i ran the above command... :(

                      – Abhishek Aravindan
                      Mar 22 at 11:09











                    • I have updated my answer.

                      – Umar Khan
                      Mar 22 at 11:21











                    • i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                      – Abhishek Aravindan
                      Mar 22 at 11:37














                    0












                    0








                    0







                    To create extension in your database, you have to explicitly connect to that database. So, if your database is my_app_development, you have to do :



                    sudo -u postgres psql my_app_development
                    create extension hstore;


                    Also, you do not tell which rails version you're on. If you're not on rails-4, you will have to use the postgres hstore gem.






                    share|improve this answer















                    To create extension in your database, you have to explicitly connect to that database. So, if your database is my_app_development, you have to do :



                    sudo -u postgres psql my_app_development
                    create extension hstore;


                    Also, you do not tell which rails version you're on. If you're not on rails-4, you will have to use the postgres hstore gem.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 22 at 11:21

























                    answered Mar 22 at 11:05









                    Umar KhanUmar Khan

                    1,020715




                    1,020715












                    • ERROR: extension "hstore" already exists when i ran the above command... :(

                      – Abhishek Aravindan
                      Mar 22 at 11:09











                    • I have updated my answer.

                      – Umar Khan
                      Mar 22 at 11:21











                    • i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                      – Abhishek Aravindan
                      Mar 22 at 11:37


















                    • ERROR: extension "hstore" already exists when i ran the above command... :(

                      – Abhishek Aravindan
                      Mar 22 at 11:09











                    • I have updated my answer.

                      – Umar Khan
                      Mar 22 at 11:21











                    • i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                      – Abhishek Aravindan
                      Mar 22 at 11:37

















                    ERROR: extension "hstore" already exists when i ran the above command... :(

                    – Abhishek Aravindan
                    Mar 22 at 11:09





                    ERROR: extension "hstore" already exists when i ran the above command... :(

                    – Abhishek Aravindan
                    Mar 22 at 11:09













                    I have updated my answer.

                    – Umar Khan
                    Mar 22 at 11:21





                    I have updated my answer.

                    – Umar Khan
                    Mar 22 at 11:21













                    i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                    – Abhishek Aravindan
                    Mar 22 at 11:37






                    i'm using rails 5 and the gem is not working ,. ` undefined method alias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)

                    – Abhishek Aravindan
                    Mar 22 at 11:37


















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid …


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55298040%2fpgundefinedobject-error-type-hstore-does-not-exist-in-rails-production%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                    Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?