Wednesday, March 28, 2012
Tuesday, March 27, 2012
Rails Migrations do work with rubyfb
Good news everyone migrations do work with latest rails 3.2.2 and latest rubyfb
here is the proof
rails generate scaffold User name:string email:string
invoke active_record
create db/migrate/20120327192907_create_users.rb
create app/models/user.rb
invoke test_unit
create test/unit/user_test.rb
create test/fixtures/users.yml
route resources :users
invoke scaffold_controller
create app/controllers/users_controller.rb
invoke erb
create app/views/users
create app/views/users/index.html.erb
create app/views/users/edit.html.erb
create app/views/users/show.html.erb
create app/views/users/new.html.erb
create app/views/users/_form.html.erb
invoke test_unit
create test/functional/users_controller_test.rb
invoke helper
create app/helpers/users_helper.rb
invoke test_unit
create test/unit/helpers/users_helper_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/users.js.coffee
invoke scss
create app/assets/stylesheets/users.css.scss
invoke scss
create app/assets/stylesheets/scaffolds.css.scss
mariuz@borki7:~/work/ruby/demo_app$ rake db:migrate
== CreateUsers: migrating ====================================================
-- create_table(:users)
-> 0.2720s
-> 0 rows
== CreateUsers: migrated (0.2723s) ===========================================
Fire ruby - howto start with Firebird and Ruby on ubuntu / debian
This howto is about installing firebird ruby driver on Ubuntu (tested on natty) and Debian (tested on Sid)
you might need some firebird dependencies and if you need the stable Firebird server Firebird 2.5 guide to install it
The very basic firebird package to build only the driver is firebird2.5-dev
if is already installed you will get :
Then you need to install ruby and rubygems , the recommended way is to use and install rvm
Alternate way is to build install our gem (latest build-able is located here )
I could build only with gem 1.9.x (with gem 1.8 i have got this error undefined method `mark_version' for nil:NilClass )
You will get something like this in terminal :
Now is time to install it using the gem command
Please read the README.
here is how i tested on my machine
I had to add require 'rubygems'
to the example from README and all was ok after that
Here is part of the example i ran on my pc
And here are the results for my ruby test
What is next class ? RoR on Firebird
you might need some firebird dependencies and if you need the stable Firebird server Firebird 2.5 guide to install it
The very basic firebird package to build only the driver is firebird2.5-dev
sudo apt-get install firebird2.5-dev git-coreand choose yes when asked
if is already installed you will get :
firebird2.*-dev was already installed
Then you need to install ruby and rubygems , the recommended way is to use and install rvm
rvm install 1.9.3 rvm use 1.9.3Best way is to install it from gem
gem install fb
Alternate way is to build install our gem (latest build-able is located here )
git clone https://github.com/rowland/fb.git cd fb/ gem build fb.gemspec
I could build only with gem 1.9.x (with gem 1.8 i have got this error undefined method `mark_version' for nil:NilClass )
You will get something like this in terminal :
Successfully built RubyGem Name: fb Version: 0.7.x File: fb-0.7.x.gem
Now is time to install it using the gem command
gem install fb-0.7.*
Please read the README.
here is how i tested on my machine
I had to add require 'rubygems'
to the example from README and all was ok after that
Here is part of the example i ran on my pc
pico test.rb
And here are the results for my ruby test
ruby test.rb ID: 0, Name: John 0 ID: 9, Name: John 9
What is next class ? RoR on Firebird
Sunday, March 25, 2012
Migrating to django 1.4
First i have fixed the warnings
[Sun Mar 25 21:15:41 2012] [error] DeprecationWarning [Sun Mar 25 21:15:42 2012] [error] /usr/lib/python2.5/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead. [Sun Mar 25 21:15:42 2012] [error] "use STATIC_URL instead.", DeprecationWarning) [Sun Mar 25 21:15:42 2012] [error] /usr/lib/python2.5/site-packages/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead. [Sun Mar 25 21:15:42 2012] [error] DeprecationWarningso i have deleted the line ADMIN_MEDIA_PREFIX from settings.py and need to configure the "/media" for the admin url also replaced
CACHE_BACKEND = 'locmem://'with
{
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
}
}
Subscribe to:
Posts (Atom)






