» Home » rails » Page 1
Are there 3 forms to invoke production, staging, etc in Ruby on Rails for rails server, rails console, and rake?
Category : Programming Languages

The forms I know of are:


For Rails 3.0:


for rails server:


rails server -e production

for rails console


rails console production

for rake


rake db:migrate RAILS_ENV=production

Is that it? I know for rails runner and rails dbconsole, it is


View Replies


Routes.rb - from Rails 2.x to Rails 3.x “How to Create a Blog from Scratch Using Ruby on Rails” tutorial
Category : Programming Languages

I'am working on "How to Create a Blog from Scratch Using Ruby on Rails" from http://sixrevisions.com. The tutorial was created for Rails 2.x. I try to get It working on Rails 3.x. . When I run server I and run localhost:3000 get some serious routing error:


Called from: C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/ac
tion_dispatch/middleware/session/abstr

View Replies


script/console won't work; reports “Missing the Rails gem. Please `gem install -v= rails`…” even though rails shows as installe
Category : Programming Languages

I'm trying to learn RoR, and running script/console fails, returning:


Loading development environment (Rails 2.3.5)
Missing the Rails gem. Please gem install -v= rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.


Both

View Replies


'rails' command creates directory with /vendor/rails which uses wrong version of rails
Category : Programming Languages

For some reason when I run rails command, it installs 2.2.3 version of Rails in /vendor/rails and webbrick uses that version instead of 2.3.5 which is installed as a gem.


If I delete that, then it uses the right directory. I remember using git submodule once, but I don't think that has anything to do with this.


How can I correct this? Thanks


Edit:



View Replies


Heroku Rails 3 Rails.cache.class reports ActiveSupport::Cache::FileStore after I call Rails.application.config.cache_store = :redis_store, “#{ur
Category : Network & Servers

Where url=redis://redistogo:XXXYYYZZZ@cod.redistogo.com:9362/


This is called in my initializer code.


Here is the other pertinent config options:


1) in production.rb


config.action_controller.perform_caching = true in my production.rb

2) In my controller:


caches_action :show, :layout => false,

View Replies


How to update my rails 3.0.0 beta 4 app to rails 3.0.0 RC and eventually to Rails 3?
Category : Programming Languages

My first problem is a bundler conflict


$ bundle install
Fetching source index from http://rubygems.org/
No compatible versions could be found for required dependencies:
Conflict on: "bundler":
* bundler (0.9.26) activated by bundler (= 0.9.26, runtime)
* bundler (>= 1.0.0.rc.1, runtime) required in Gemfile
All possible versions of

View Replies


Rails gem error while trying to upgrade rails project to rails 3
Category : Programming Languages

While trying to upgrade rails project from rails 2.3.5 to rails 3.0.3 i get following error:-


/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems.rb:230:in
activate': can't activate rails (=
2.3.5, runtime) for [], already activated rails-3.0.3 for []
(Gem::LoadError) from
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/r


View Replies


For Rails, if there is a project that uses Rails 3.0.0, it looks for bundler 1.0.0 and it is there but rails server won't run?
Category : Programming Languages

I have a Rails 3.0.0 project that was using Ruby 1.9.2. Now that I tried to run it on a new computer with the current rvm, it will say:


$ rails s
/Users/michael/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/resolver.rb:129:in `block in resolve': Bundler could not find compatible versions for gem "bundler": (Bundler::VersionConflict)
In Gemfile:

View Replies


Rails 3's “bundle install” is super fast (takes 1 second), but no Rails is there afterwards? (using rvm)
Category : Programming Languages

I am using rvm, doing the following:


rvm install ree <--- (Ruby Enterprise Edition), or this can be 1.8.7 or 1.9.2
rvm ree
rvm gemset create 'proj'
cd path/to/proj
bundle install

so Gemfile in that project says:


gem 'rails', '3.0.0'

and bundle install is super fast, reporting



View Replies


Ruby on Rails: Error while using validation_reflection on Rails 3.2 model - Formtastic cannot display errors
Category : Programming Languages

I am successfully using formtastic to display my new/edit views for my models.


The railscast on formtastic talks about installing a plugin 'validation_reflection'. Since this railscast is fairly old, I was wary of installing the plugin. I found the validation_reflection gem, installed it. When I access a model I am getting:


undefined method `write_inheritable_array'

View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .