Sunday, May 2, 2010

Ruby rutorials

Ruby on Rails Tutorial book

Show Me Do

Mac Ruby:

Other resources:

Beginning Ruby on Rails E-Commerce


Ruby IDE:

Ruby code complete:

Setup Rails

Gems: Simple, efficient message processing for your Rails 3 application.
delayed_job — фоновая обработка любых заданий

immortal Гем от разработчиков Teambox, который позволяет вместо удаления записи помечать ее как 'deleted'. Бывает очень полезно, если мы хотим оградить неосторожного пользователя от потери данных.

Settingslogic - Существует довольно большое кол-во гемов, решающих проблему настроек в приложении. Весьма удачной реализацией является Settingslogic от небезызвестного Бена Джонсона. Простой, легковесный, использует YML-файл. 

Subdomains - An example Rails 3.2 app with subdomains and authentication using Devise. With a tutorial.
Если понадобится работать с S3 хранилищем от Amazon то можно пользоваться его локальным фейком в ходе разработки: Fake S3

Install Errors

RubyMine on Win

  1. Install Ruby:
  2. Install Development Kit: (install instructions)
  3. Install RubyMine
  4. Run: gem install bundler
  5. Download latest versions of linecache and ruby-debug-base19
    1. E.g. for Ruby 1.9.3-p0  following versions are needed (download):
      1. download linecache19-0.5.13.gem
      2. ruby-debug-base19-0.11.26.gem
  6. Read
  7. Run: gem install linecache19-0.5.13.gem
  8. Run: gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=PATH
    1. Where PATH is the path to the include folder, e.g. C:\Ruby193\include\ruby-1.9.1\ruby-1.9.3-p0
  9. Start RubyMine and do: tools->bundler->install
  10. Go to project root folder and run: rake db:migrate
  11. Enjoy
If you moved a project to another directory and you are getting an error because of a wrong working folder, them the sollution is here (source):
I also had this problem with a project copied from windows to ubuntu. The issue is that the Run Configurations that were created on the windows side contain absolute paths like c:\someproject. To fix this you do not need to recreate the project. Simple close the project then edit the workspace.xml file in your project's .idea folder and search for the term WORK DIR. In some of the VALUE attributes you will see a windows path, change them all to be  $PROJECT_DIR$ then save the file and reopen the project.


The other option is to delete all the existing Run Configurations and recreate them, still easier than redoing the whole project.
I do think this is a bug, the Run Configurations should have relative (or OS independant) paths when created on windows.

Issue with rake: uninitialized constant Rake::DSL

  1. удалить все версии rake: gem uninstall rake -v, gem uninstall rake -v 0.8.7
  2. ручная установка 0.8.7: gem install rake -v 0.8.7
  3. bundle install => поставится еще
  4. Put this in your Rakefile above require 'rake': require 'rake/dsl_definition'
  5. написать/исправить в Gemfile: gem "rake", "!= 0.9.0" (это может и ненужно, но не помешает)
  6. run db:migrate

0 коммент.:

Post a Comment

Powered by Blogger.