(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;
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
add a comment |
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
add a comment |
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
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
ruby-on-rails postgresql digital-ocean
edited Mar 22 at 11:02
Abhishek Aravindan
asked Mar 22 at 10:52
Abhishek AravindanAbhishek Aravindan
1099
1099
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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.
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 methodalias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)
– Abhishek Aravindan
Mar 22 at 11:37
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 22 at 13:15
Łukasz KamińskiŁukasz Kamiński
3,3941819
3,3941819
add a comment |
add a comment |
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.
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 methodalias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)
– Abhishek Aravindan
Mar 22 at 11:37
add a comment |
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.
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 methodalias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)
– Abhishek Aravindan
Mar 22 at 11:37
add a comment |
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.
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.
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 methodalias_method_chain' for ActiveRecord::ConnectionAdapters::PostgreSQLColumn:Class (NoMethodError)
– Abhishek Aravindan
Mar 22 at 11:37
add a comment |
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 methodalias_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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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