librelist archives

« back to archive

build error

build error

From:
Matt Davies
Date:
2010-01-11 @ 14:27
Hello.

I'm trying to run a manual build on a new project but I'm getting a
rake error back.

The app I'm trying to test uses gem bundler, and if you look in the
error it's trying to find something within the bundler_gems folder
which is the folder I've created for the bundled gems in the app.

rake aborted!
no such file to load --

/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/config/../config/../vendor/bundler_gems/environment

/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/Rakefile:4
(See full trace by running task with --trace)
(in 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914)

Has anyone got any ideas what is happening here?

Thanks in advance

Re: [integrity] build error

From:
Nick Quaranto
Date:
2010-01-11 @ 15:02
It sounds like you need to run `gem bundle` before you do rake (gem bundle
&& rake)

-Nick

On Mon, Jan 11, 2010 at 9:27 AM, Matt Davies <tonmatt@gmail.com> wrote:

> Hello.
>
> I'm trying to run a manual build on a new project but I'm getting a
> rake error back.
>
> The app I'm trying to test uses gem bundler, and if you look in the
> error it's trying to find something within the bundler_gems folder
> which is the folder I've created for the bundled gems in the app.
>
> rake aborted!
> no such file to load --
>
> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/config/../config/../vendor/bundler_gems/environment
>
> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/Rakefile:4
> (See full trace by running task with --trace)
> (in
> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914)
>
> Has anyone got any ideas what is happening here?
>
> Thanks in advance
>

Re: [integrity] build error

From:
Matt Davies
Date:
2010-01-11 @ 16:52
Thanks Nick, I'm getting there slowly

On question, how do I get around the problem that I'm writing a rake
task to copy over database.yml from somewhere else on the system, but
rake wont work at all without database.yml being present?

Any ideas?

desc "setting up the testing environment"
  task(:test_dbase_setup => :environment) do
  system("/usr/bin/gem bundle")
  system("cp /var/www/rails/database.yml #{RAILS_ROOT}/config/database.yml")
  end

  desc "Prepare for CI and run entire test suite"
  task :build => ['glam:test_dbase_setup', 'db:migrate', 'features'] do
  end

2010/1/11 Nick Quaranto <nick@quaran.to>:
> It sounds like you need to run `gem bundle` before you do rake (gem bundle
> && rake)
> -Nick
> On Mon, Jan 11, 2010 at 9:27 AM, Matt Davies <tonmatt@gmail.com> wrote:
>>
>> Hello.
>>
>> I'm trying to run a manual build on a new project but I'm getting a
>> rake error back.
>>
>> The app I'm trying to test uses gem bundler, and if you look in the
>> error it's trying to find something within the bundler_gems folder
>> which is the folder I've created for the bundled gems in the app.
>>
>> rake aborted!
>> no such file to load --
>>
>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/config/../config/../vendor/bundler_gems/environment
>>
>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/Rakefile:4
>> (See full trace by running task with --trace)
>> (in
>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914)
>>
>> Has anyone got any ideas what is happening here?
>>
>> Thanks in advance
>
>

Re: [integrity] build error

From:
Tj Singleton
Date:
2010-01-11 @ 17:02
On Jan 11, 2010, at 11:52 AM, Matt Davies wrote:

> On question, how do I get around the problem that I'm writing a rake
> task to copy over database.yml from somewhere else on the system, but
> rake wont work at all without database.yml being present?


I use a bash script to copy over everything before I run rake. My build 
command is like this:
/path/to/bash/script && rake 

TJ

Re: [integrity] build error

From:
Matt Davies
Date:
2010-01-11 @ 17:48
Thanks TJ and foca

foca

I coudn't get your example to work, it wasn't making the file still

Any chance of seeing your code?

TJ, can I take a peak at your bash script?

How do you refer to the build folder itself?

sorry to be such a pain, I will write up my stuff on a blog post and
post the link up here

2010/1/11 TJ Singleton <tj@deepsalt.com>:
> On Jan 11, 2010, at 11:52 AM, Matt Davies wrote:
>
>> On question, how do I get around the problem that I'm writing a rake
>> task to copy over database.yml from somewhere else on the system, but
>> rake wont work at all without database.yml being present?
>
>
> I use a bash script to copy over everything before I run rake. My build 
command is like this:
> /path/to/bash/script && rake
>
> TJ
>

Re: [integrity] build error

From:
Tj Singleton
Date:
2010-01-11 @ 17:52
> TJ, can I take a peak at your bash script?

cat > config/database.yml <<-EOF
 test: &TEST
   adapter: mysql
   encoding: utf8
   database: *********
   username: *********
   password: *********
   socket: **********
 development:
   <<: *TEST
   database: *********
 cucumber:
   <<: *TEST
EOF
rake serp:ci_prep 1>/dev/null

> How do you refer to the build folder itself?

It's executed in the build folder so I just keep the paths relative. 

TJ

Re: [integrity] build error

From:
Matt Davies
Date:
2010-01-11 @ 18:05
Thanks TJ

Do you mean that this bash script file is located inside your application?



2010/1/11 TJ Singleton <tj@deepsalt.com>:
>
>> TJ, can I take a peak at your bash script?
>
> cat > config/database.yml <<-EOF
>  test: &TEST
>   adapter: mysql
>   encoding: utf8
>   database: *********
>   username: *********
>   password: *********
>   socket: **********
>  development:
>   <<: *TEST
>   database: *********
>  cucumber:
>   <<: *TEST
> EOF
> rake serp:ci_prep 1>/dev/null
>
>> How do you refer to the build folder itself?
>
> It's executed in the build folder so I just keep the paths relative.
>
> TJ
>

Re: [integrity] build error

From:
Tj Singleton
Date:
2010-01-11 @ 18:18
On Jan 11, 2010, at 1:05 PM, Matt Davies wrote:

> Thanks TJ
> 
> Do you mean that this bash script file is located inside your application?
> 

I keep it in /var/www/integrity/support/. My build command in the project 
edit is: 
	/var/www/integrity/support/prep_build; rake

What i meant is since the script is executed from my the current build, 
all the commands in it are relative to that directory. 

Hope this helps. 

TJ

Re: [integrity] build error

From:
Nicolás Sanguinetti
Date:
2010-01-11 @ 17:00
On Mon, Jan 11, 2010 at 2:52 PM, Matt Davies <tonmatt@gmail.com> wrote:
> Thanks Nick, I'm getting there slowly
>
> On question, how do I get around the problem that I'm writing a rake
> task to copy over database.yml from somewhere else on the system, but
> rake wont work at all without database.yml being present?
>
> Any ideas?
>
> desc "setting up the testing environment"
>  task(:test_dbase_setup => :environment) do
>  system("/usr/bin/gem bundle")
>  system("cp /var/www/rails/database.yml #{RAILS_ROOT}/config/database.yml")
>  end
>
>  desc "Prepare for CI and run entire test suite"
>  task :build => ['glam:test_dbase_setup', 'db:migrate', 'features'] do
>  end

The problem is that you're requiring the environment (which in turn
requires database.yml) for that rake task.

Something along the following lines should work

  file "config/database.yml" do |file|
    cp File.join("/var/www/rails", file.name), file.name
  end

  task :build => ["config/database.yml", "db:test:prepare", "features"]

Also, you don't need to run gem bundle from within rake. Your
integrity build command should be something like "gem bundle && rake
build"

Cheers,
-foca

> 2010/1/11 Nick Quaranto <nick@quaran.to>:
>> It sounds like you need to run `gem bundle` before you do rake (gem bundle
>> && rake)
>> -Nick
>> On Mon, Jan 11, 2010 at 9:27 AM, Matt Davies <tonmatt@gmail.com> wrote:
>>>
>>> Hello.
>>>
>>> I'm trying to run a manual build on a new project but I'm getting a
>>> rake error back.
>>>
>>> The app I'm trying to test uses gem bundler, and if you look in the
>>> error it's trying to find something within the bundler_gems folder
>>> which is the folder I've created for the bundled gems in the app.
>>>
>>> rake aborted!
>>> no such file to load --
>>>
>>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/config/../config/../vendor/bundler_gems/environment
>>>
>>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914/Rakefile:4
>>> (See full trace by running task with --trace)
>>> (in
>>> 
/var/www/rails/integrity/builds/git-github-com-kwevans-daughter-git-master/b1e16efe1f25362e726773cba4c32b2310eec914)
>>>
>>> Has anyone got any ideas what is happening here?
>>>
>>> Thanks in advance
>>
>>
>