Tagged Questions
0
votes
0answers
32 views
FATAL: Password Authentication Failed For User
I'm having an issue connecting my postgres database. I created a user for it (it never prompted me for a password), so I ran the command ALTER USER user_name WITH PASSWORD password to create one. I ...
0
votes
2answers
19 views
Convert rails mysql SQL to work with postresql
I have the following tags method which selects tags based on how many times they are used and then arrange them in that order. Code is based on the railscasts episode: ...
0
votes
1answer
34 views
Rails IDs gives 404
In my rails App, I have a Movies table and a Genres table. Genres need to have a specific :id so that the association between the movies and the genres can work properly. I can't change the genres id.
...
1
vote
1answer
26 views
Postgresql error on bundle install
I think this is a common problem, however the solutions I've found on the internet are not working for me. When I run bundle install with this section in my gemfile
group :production, :staging do
...
0
votes
0answers
23 views
Alternative for Serial type in RedShift / PostgreSQL
I am actually trying to make Rails working with RedShift, and facing some issue with Rails default indexes. My work is based on the repo activerecord-redshift-adapter.
By default, Rails use the ...
0
votes
1answer
35 views
ordering through an has_many relationship with a condition in rails 3 / active records / postgresql
I have two objects, items and taxonomy nodes.
An item can have several taxonomy_nodes, and I am using the awesome_nested_set gem to get the taxonomy_nodes to behave like nested sets with a ...
2
votes
0answers
52 views
Updating postgis to version 2.1
I have used homebrew to update to the most recent version of postgis. (2.1)
brew unlink postgis
brew install postgis
I then have created a migration to alter the postgis extension to 2.1
rails g ...
0
votes
2answers
31 views
Do I have to manually make a new local database for each new rails app?
Newbie question.
I set up a rails app to use postrges locally, which took me awhile.
Of course I had to fill in the database.yml file with the database details, but I was doing that in the manner of ...
0
votes
1answer
33 views
running rails on guest linux virtualbox: a database.yml issue
a) I'm a ruby in rails beginner developer, and I use windows 7 machine as developement environment...
b) With VirtualBox I just installed, inside the Windows 7 "host", a Linux ubuntu sever "guest", ...
0
votes
2answers
30 views
Getting results between two dates in PostgreSQL including those two dates
I have two dates , I want to display all records in those two dates including those dates.
How can i write query in PostgreSQL,
I have found
SELECT *
FROM mytable
WHERE (start_date, end_date) ...
0
votes
1answer
36 views
Ruby on Rails - db:create:all error
When I am trying to create a new rails app with a postgres db I cannot complete the rake command.
This is what I have done.
sayth@sayth-TravelMate-5740G:~$ sudo -u postgres psql postgres
[sudo] ...
0
votes
1answer
66 views
An error occurred while installing the Pg gem [on hold]
I am creating a new rails app and I am having problems with postgres.
My computer has worked fine doing the same for the last few months until now.
1
vote
1answer
45 views
Do rails Transactions blocks exit after all actions have been committed?
Related to Run rails code after an update to the database has commited, without after_commit, but I think deserving its own question.
If I have code like this:
my_instance = MyModel.find(1)
...
1
vote
1answer
29 views
Postgres No permission to create user
I am unable to use rails with postgres. The database wont create:
sayth@sayth-TravelMate-5740G:~/testapp2$ rake db:create:all
PG::InsufficientPrivilege: ERROR: permission denied to create database
: ...
3
votes
2answers
56 views
Run rails code after an update to the database has commited, without after_commit
I'm trying to battle some race cases with my background task manager. Essentially, I have a Thing object (already exists) and assign it some properties, and then save it. After it is saved with the ...