Ruby on Rails Saturday, October 1, 2011

On Oct 1, 2011, at 8:49 AM, Peter Vandenabeele wrote:

> On Fri, Sep 30, 2011 at 6:35 PM, Andre Flory <lists@ruby-forum.com> wrote:
> I have somewhat of a complex issue involving several different programs
> including redmine, MySQL, Ruby, Ruby on Rails etc.
>
> I am following the redmine instructions here:
> http://www.redmine.org/projects/redmine/wiki/RedmineInstall
>
> I am on step 5. where I am suppose to type "RAILS_ENV=production rake
> db:migrate"
>
> When I type this in the command prompt and hit enter I get an error:
> "RAILS_ENV" is not a command blah blah.


Sorry, I think you typed "RAILS_ENV" and what I meant was

RAILS_ENV="production"

quoting the value, not the name of the variable.

Walter


>
>
> That is strange.
>
> On a bash shell, with Rails 3.1.x (but also 2.3.x) I can do:
>
> peterv@ASUS:~/f$ RAILS_ENV=production
> RAILS_ENV=production
> peterv@ASUS:~/f$ RAILS_ENV=production rake environment
> RAILS_ENV=production rake environment
> peterv@ASUS:~/f$ RAILS_ENV=production rails c
> RAILS_ENV=production rails c
> Loading production environment (Rails 3.1.1.rc1)
> 001:0> quit
>
> Could you paste literally the output of
>
> $ bash -v
> $ RAILS_ENV=production
> $ RAILS_ENV=production rake environment # this will probably fail on your system
>
>
>
> So I reorder it to: rake db:migrate RAILS_ENV=production
>
> This seems to work correct, but I get the following:
>
> ===============================================================
> C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production --trace
> NOTE: SourceIndex.new(hash) is deprecated; From
> C:/redmine-1.2.1/config/../vendo
> r/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
> rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
> WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use
> 'task :t, [
> args] => [deps]' instead.
> at C:/redmine-1.2.1/lib/tasks/email.rake:170
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> rake aborted!
> Access denied for user 'redmine'@'localhost' (using password: YES)
>
> ...
>
>
> Here is my database.yml file contents:
>
> ###############################################################
>
> # MySQL (default setup).
>
> production:
> adapter: mysql
> database: redmine
> host: localhost
> username: redmine
> password: **********
> encoding: utf8
>
> development:
> adapter: mysql
> database: redmine_development
> host: localhost
> username: root
> password:
> encoding: utf8
>
> # Warning: The database defined as "test" will be erased and
> # re-generated from your development database when you run "rake".
> # Do not set this db to the same as development or production.
> test:
> adapter: mysql
> database: redmine_test
> host: localhost
> username: root
> password:
> encoding: utf8
>
> test_pgsql:
> adapter: postgresql
> database: redmine_test
> host: localhost
> username: postgres
> password: "postgres"
>
> test_sqlite3:
> adapter: sqlite3
> database: db/test.sqlite3
>
> ###############################################################
>
> It looks like you are actually using the production environment (good).
>
> Could you verify that this works then:
>
> $ mysql -h localhost -u redmine -p redmine
> Enter password:
>
> HTH,
>
> Peter
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment