I want to connect my rails 3 application to firebird database. I have followed
https://help.ubuntu.com/community/Firebird2.5
and
http://mapopa.blogspot.in/2009/02/rails-on-firebird-status-after-adapter.html
links. Also, I have included gem 'activerecord-fb-adapter' and gem 'fb' to gemfile.
But, I am getting the response "No Firebird connections established."
Also running rake db:create results in
{:adapter=>"fb",
:database=>"localhost/3050:/var/lib/firebird/2.5/data/rubyonfire.fdb",
:username=>"SYSDBA",
:password=>"*******",
:host=>"localhost",
:downcase_names=>true}
{:adapter=>"fb",
:database=>"localhost/3050:/var/lib/firebird/2.5/data/rubyonfire_test.fdb",
:username=>"SYSDBA",
:password=>"*******",
:host=>"localhost",
:downcase_names=>true}
Any help is highly appreciated.
Thanks in advance.
Adding create: true in database.yml resolved the issue. See below link for details :-
https://github.com/rowland/activerecord-fb-adapter/issues/1#issuecomment-6608210
Thanks
Related
Upon running "rake db:migrate", I'm getting an "database configuration does not specify adapter" error.
Here's my database.yml:
development:
adapter: postgresql
database: development
username: ##########
password: ##########
host: localhost
pool: 5
timeout: 5000
My Gemfile lists:
gem 'pg'
Figured out what it was. I skyped the database.yml to myself, and it inserted a ton of invisible characters which prevented the YAML from being read.
In my case
RAILS_ENV=development rake db:migrate
did the trick.
Have you made sure you set the environment to development?
It's export RAILS_ENV=development on my mac.
I was also getting this error after some recent changes to my Rails app. First the error showed up in the unicorn logs, so I tried running rake db:setup, and got the error there too.
In my case, I somehow got an extra space placed in front of the test database definition. So my database.yml looked like this:
...
test:
adapter: postgresql
...
production:
adapter: postgresql
...
instead of this:
...
test:
adapter: postgresql
...
production:
adapter: postgresql
...
I removed the space and that fixed the issue.
I'm having the same heroku rake issues described (and from what I can tell solved) in this question.
When I try the fix (include require 'rake/dsl_definition' above require 'rake') I get the same
'uninitialized constant Rake::DSL'
error from heroku + I get the error
'no such file to load -- rake/dsl_definition'
from my local rake.
Without incorporating the fix (using the standard rakefile) I can use rake on my local setup with no errors (with the same heroku error)
I'm using rake version 0.8.7 (though I get the same results using 0.9.2) and Rails 3.0.9. I've gone through the suggestions in the previous question but from what I can tell the problem isn't with my Gemfile. Has anyone else had this problem? Has anyone else solved their heroku rake problem using a different solution? Or can anyone explain/suggest how I'm going about this incorrectly?
Thank you for your help.
Try adding require 'rake/dsl_definition' on top of Rakefile.
Not enough for me. I was getting the no such file to load -- rake/dsl_definition error even adding the require 'rake/dsl_definition' line in the "Rakefile" file
I had all gems version OK and only 0.8.7 rake version but I had to create a "Gemfile" in the redmine root path with the next content:
gem "rake", "0.8.7"
And delete the require 'rake/dsl_definition' line added previously in Rakefile
Hope be usefull for someone
Hi
I know this question have been asked before but the answers there isn't working for me.
I still get the, when redirecting back to my site.
/auth/failure?message=invalid_response
I have ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0] installed, using rails 3.0.7 and the required gems installed. I read on another thread that you should have pure_json added to the gemfile to make it work. But that didn't help me either.
I'm clueless... Thanks in advance
authenticationscontroller
def index
#authentications = current_user.authentications if current_user
end
def create
#render :text => request.env["omniauth.auth"].to_yaml
auth = request.env["omniauth.auth"]
current_user.authentications.find_or_create_by_provider_and_uid(auth['provider'], auth['uid'])
flash[:notice] = "Authentication successful."
redirect_to authentications_url
end
I was able to get this to work by specifying the following in my Gemfile
gem 'omniauth', '0.2.0'
Version 0.2.6 wouldn't work for me. I also updated by .rvmrc to rvm use 1.9.2#rails3. Oh, also make sure you're logged in - do note that in your code above you are assuming that current_user exists. See Ryan's Railscast part two for allowing user creation via Omniauth.
I've got a demo working here, but do note I'm doing authentication from scratch rather than using Devise.
I use rails 3.
In development mode I installed some gems for Testing (diff-lcs, nokogiri, rspec, webrat).
Since I did that, if I try to cap-deploy to the production server, it complains:
"Could not find diff-lcs in any of the sources (Bundler::GemNotFound)"
I don't want to install them on the server, because I don't need the testing purpose gems on the production server.
Can I put something in the Gemfile to maybe exclude them for production mode?
Or else how can I handle this?
Thank you very much for answering this questiion by a struggling beginner...
You can put those gems in their own group like this:
group :development, :test do
gem 'diff-lcs'
end
This page explains groups in more details: http://gembundler.com/groups.html
Anyone know of a Ruby SQL parser?
Here's an example of a SQL parser done with rparsec:
http://docs.codehaus.org/display/JPARSEC/SQL+parser+in+rparsec
this is the svn tree for a sql parser based on Treetop
I post answer here for someone who will need. I found this gem 'sql-parser'
gem install sql-parser
However this gem is not up-to-date if you install with command 'gem install'. So we have to check out the code from github also to get latest version. When I try to parse an insert statement after gem install. It failed.
After updating code from github. it can parse.
Github
https://github.com/cryodex/sql-parser
Try the gda gem by tenderlove.
RubyGems: https://rubygems.org/gems/gda
Github: https://github.com/tenderlove/gda/