(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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현