Local Install: Error at "ruby script/server"

62 views
Skip to first unread message

Shawn Cheatham

unread,
Dec 18, 2010, 1:52:09 PM12/18/10
to Fat Free CRM Developers
If this question is better suited for StackOverflow, let me know...
I'm sure it's something with my local environment configuration but
thought I'd post here first.

I've been learning Rails 3 for few months now but after failing to
setup the Rails 3 branch of FFC I decided to try the Master branch. I
can't figure out why and how to resolve the following error during
local machine installation...

A couple notes...
1. Running Mac 10.5
2. I'm using RVM to switch between Rails 3 and 2.3.8 with Ruby 1.9.2
on both
3. In the install process I opted for mysql at which point I was
prompted to install the mysql gem
4. The setup and load steps worked fine

but running ruby script/server threw the following error

$ ruby script/server
<internal:lib/rubygems/custom_require>:29:in `require': no such file
to load -- script/../config/boot (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/server:2:in `<main>'

Any ideas?

Michael Dvorkin

unread,
Dec 18, 2010, 3:30:13 PM12/18/10
to Fat Free CRM Developers
Hi,

The master branch requires Rails 2.3.8 and trying to make it run with
Rails3 is rather unproductive unless your goal is to try to do the
port. There is 'rails3' branch already, so (from the top of my head):

$ git clone git://github.com/michaeldv/fat_free_crm.git
$ cd fat_free_crm
$ git checkout -b rails3
$ git pull origin rails3
$ git add .
$ git commit -am "Merged rails3 branch"
$ bundle install
$ rake crm:setup
...etc...

Hope it'll get you going ;-)

Michael
http://www.fatfreecrm.com

Shawn Cheatham

unread,
Dec 18, 2010, 6:55:42 PM12/18/10
to Fat Free CRM Developers
Thanks Michael,

For clarification...I was using Rails 2.3.8 when I encountered that
issue but your response still helped.

I'm not sure what I'm missing but based on your instructions I
stumbled across a different issue which shows some cryptic (to me
anyway) message.

$ cd rails_projects
$ git clone git://github.com/michaeldv/fat_free_crm.git
$ cd fat_free_crm
$ git checkout -b rails3
$ git pull origin rails3
$ git add .
$ git commit -am "Merged rails3 branch"
$ bundle install
$ cp config/database.mysql.yml config/database.yml

Edited database.yml file

$ gem install mysql (Per database.yml comments)

$ rails -v
3.0.3

$ rake db:create

Returned
fat_free_crm_test already exists
fat_free_crm_development already exists

$ rake crm:setup

Added new admin user/password and received the following msg after
confirming the update

Continue [yes/no/exit]: yes

rake aborted!
syntax error on line 12, col 0: `>>>>>>>
190e5e737667868ff55754a9af259636746c3dd9'

$ rails server

Application Trace shows the following...

app/models/user.rb:81:in `<class:User>'
app/models/user.rb:53:in `<top (required)>'
app/models/authentication.rb:19:in `<class:Authentication>'
app/models/authentication.rb:18:in `<top (required)>'
app/controllers/application_controller.rb:104:in
`current_user_session'
app/controllers/application_controller.rb:113:in `current_user'
app/controllers/application_controller.rb:122:in `require_user'

I'll keep at it and see if I can try removing the test/dev databases
that seem to be messing things up.

Thanks,
Shawn


On Dec 18, 3:30 pm, Michael Dvorkin <m...@fatfreecrm.com> wrote:
> Hi,
>
> The master branch requires Rails 2.3.8 and trying to make it run with
> Rails3 is rather unproductive unless your goal is to try to do the
> port. There is 'rails3' branch already, so (from the top of my head):
>
> $ git clone git://github.com/michaeldv/fat_free_crm.git
> $ cd fat_free_crm
> $ git checkout -b rails3
> $ git pull origin rails3
> $ git add .
> $ git commit -am "Merged rails3 branch"
> $ bundle install
> $ rake crm:setup
> ...etc...
>
> Hope it'll get you going ;-)
>
> Michaelhttp://www.fatfreecrm.com

Michael Dvorkin

unread,
Dec 18, 2010, 10:24:08 PM12/18/10
to Fat Free CRM Developers
Hi,

Good, you're making progress! :-) Use config/database.mysql.yml in
'rails3' as an example. With Ruby 1.9.2/Rails3 it's mysql2 gem, not
mysql. Once you have mysql2 installed run rake with trace option to
see the backtrace if the command fails:

$ rake -T crm
$ rake crm:setup --trace
$ rake crm:demo:load --trace
...etc...

Best,
Michael
http://www.fatfreecrm.com

Shawn Cheatham

unread,
Dec 20, 2010, 11:54:28 AM12/20/10
to Fat Free CRM Developers
Strange, despite starting from scratch I still received the same
error. Here's the results of a new attempt with error results
https://gist.github.com/f3680f7fd2ac3159d707

I thought maybe if I changed the database name it might help (left
username = root and password empty) and at first glance it did (rake
db:create passed, as did rake crm:setup) but rake crm:demo:load was
aborted with the error...Mysql2::Error: Table
'fat_free_crm_development_2.account_contacts' doesn't exist: DELETE
FROM `account_contacts`

Maybe I'll try switching to Rails 2.3.8 and see if I get the same
result.

Thanks,
Shawn


On Dec 18, 10:24 pm, Michael Dvorkin <m...@fatfreecrm.com> wrote:
> Hi,
>
> Good, you're making progress! :-) Use config/database.mysql.yml in
> 'rails3' as an example. With Ruby 1.9.2/Rails3 it's mysql2 gem, not
> mysql. Once you have mysql2 installed run rake with trace option to
> see the backtrace if the command fails:
>
> $ rake -T crm
> $ rake crm:setup --trace
> $ rake crm:demo:load --trace
> ...etc...
>
> Best,

Paul

unread,
Jan 21, 2011, 5:22:50 AM1/21/11
to Fat Free CRM Developers
I'm trying to install the rails3 branch as well. Everything is fine
until I get to rake db:create, and I get the following:

rake db:create
(in /www/docs/crm.ouryclark.int)
rake aborted!
/www/docs/crm.ouryclark.int/lib/tasks/fat_free_crm.rake:81: syntax
error, unexpected tLSHFT, expecting keyword_end
<<<<<<< HEAD
^
/www/docs/crm.ouryclark.int/lib/tasks/fat_free_crm.rake:83: syntax
error, unexpected tEQQ, expecting keyword_end
=======
^
/www/docs/crm.ouryclark.int/lib/tasks/fat_free_crm.rake:87: syntax
error, unexpected tRSHFT, expecting keyword_end
>>>>>>> e07dcc0063e8b471b5566d24db0c4c8fef9d3ef9
^
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:235:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:235:in `block in load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:225:in `block in load_dependency'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:596:in `new_constants_in'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:225:in `load_dependency'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/dependencies.rb:235:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/engine.rb:
131:in `block in load_tasks'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/engine.rb:
131:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/engine.rb:
131:in `load_tasks'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/
application.rb:141:in `load_tasks'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/
application.rb:77:in `method_missing'
/www/docs/crm.ouryclark.int/Rakefile:7:in `<top (required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in
`standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'


Any ideas what might be happening?

On Dec 20 2010, 4:54 pm, Shawn Cheatham <shaw...@gmail.com> wrote:
> Strange, despite starting from scratch I still received the same
> error. Here's the results of a new attempt with error resultshttps://gist.github.com/f3680f7fd2ac3159d707

Alexander Kabanov

unread,
Jan 22, 2011, 3:14:48 AM1/22/11
to fat-free...@googlegroups.com
Paul,

it looks like your file
(/www/docs/crm.ouryclark.int/lib/tasks/fat_free_crm.rake) had local
modifications, and there is small conflict that needs to be resolved
manually.

best,

--Alex

> --
> You received this message because you are subscribed to the Google Groups "Fat Free CRM Developers" group.
> To post to this group, send email to fat-free...@googlegroups.com.
> To unsubscribe from this group, send email to fat-free-crm-d...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fat-free-crm-dev?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages