#NA

Stack Overflow

A language-independent collaboratively edited question and answer site for programmers.

  • on rails - Custom authentication strategy for devise

    stackoverflow.com 16 May '13, 4am

    I found this very helpful snippet in this thread on the devise google group initializers/some_initializer.rb: Warden::Strategies.add(:custom_strategy_name) do def valid? # code here to check whether to try and authenticate using this strategy; return true/false end def authenticate! #...

  • transactions - PHP / MySQL - how to prevent two requests *Update

    stackoverflow.com 12 Apr '13, 6pm

    I have some question ... example: a user will buy something for his USD Check his USD Balance Deduct the USD from his account Make an Order -> order queue user becomes his item and the other one becomes his USD Lets say, the users makes 5 requests in the same second (very fast). So it...

  • Using existing SQL Server database with Ruby on

    stackoverflow.com 07 Mar '13, 4am

    You're in luck, friend. My first Rails project (7 years ago) was against a horribly set up SQL Server database. Per the above, you need to set up your database.yml appropriately. But for an existing database, obviously it is unlikely that the table and column names conform to the Rail...

  • Error with new Rails 3.2.8 project - `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

    stackoverflow.com 04 Mar '13, 4pm

    I've just created a new amazon Linux instance and installed ruby 1.9.3 and rails 3.2.8. Upon creating a new project I immediately receive failures due to sqlite3. The error is: [root@xxxxx fun]# rails server /usr/local/share/gems/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in `require': canno...

  • on rails - How to have blank lines in a .text.haml document

    stackoverflow.com 11 Feb '13, 12pm

    I'm creating an e-mail notification in a .text.haml document. How does one denote a blank line? = @variable.name + " , you have a new update." = = = "There has been new activity." In the above example I would like the two lines that have just the haml '=' on them to be blank lines but...

  • How do I use Twitter Bootstrap with Ruby on Rails 3.2.12?

    stackoverflow.com 11 Mar '13, 5am

    I'm switching from PHP to Ruby on Rails and I'm loving it, the only thing is I'm so used to Twitter Bootstrap for most of my designs and now I feel crippled without it, I followed some tutorials like adding bootstrap-sass and what not to my Gemfile , but I still appear to be missing i...

  • on rails - RVM Bundle Install Missing Gem Error

    stackoverflow.com 23 Feb '13, 6am

    I'm kind of stuck with this problem. I am currently trying to host a Rails3/Ruby1.9.3 App on a shared host(Site5). They only provide 1.8.7 for Ruby. So, I tried installing RVM so I can make use of Ruby 1.9.3. After installing RVM successfully, running 'bundle install', I encountered t...

  • apache - Ruby on Rails Server options

    stackoverflow.com 16 Nov '12, 1pm

    The word "deployment" can have two meanings depending on the context. You are also confusing the roles of Apache/Nginx with the roles of other components. Apache vs Nginx They're both web servers. They can serve static files but - with the right modules - can also serve dynamic web ap...

Related