Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script explodes on osx #3186

Closed
rosannarosanna opened this issue Apr 24, 2012 · 11 comments
Closed

install script explodes on osx #3186

rosannarosanna opened this issue Apr 24, 2012 · 11 comments

Comments

@rosannarosanna
Copy link

I get the following error when I run the curl command:

dyn-5-47:~ rosanna$ curl https://raw.github.com/diaspora/diaspora/master/script/install.sh | /bin/sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6881  100  6881    0     0  12477      0 --:--:-- --:--:-- --:--:-- 15123
-e #####################################################################
DIASPORA* INSTALL SCRIPT

This script will guide you through the basic steps
to get a copy of Diaspora* up and running
#####################################################################


-e -n checking for git... 
/usr/bin/git
-e -n checking for ruby... 
/Users/rosanna/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
-e -n checking for gem... 
/Users/rosanna/.rvm/rubies/ruby-1.9.3-p194/bin/gem
-e -n checking for bundle... 
/Users/rosanna/.rvm/gems/ruby-1.9.3-p194/bin/bundle
-e -n checking for sed... 
/usr/bin/sed
-e 
-e checking for rvm...
-e 
-e Where would you like to put the git clone?
-e (or, where is your existing git clone)?
-e 
mkdir: .: No such file or directory
-e the folder you specified does not contain a git repo
fatal: could not create work tree dir ''.: No such file or directory
-e 
-e Database setup
cp: config/database.yml.example: No such file or directory
-e Which database type are you using?
1) MySQL
2) PgSQL
#? 1) MySQL
2) PgSQL
#? 1) MySQL
2) PgSQL
#? #? #? #? 1) MySQL
2) PgSQL
#? #? #? #? 1) MySQL
2) PgSQL
#? #? #? #? 1) MySQL
2) PgSQL
#? #? #? 1) MySQL
2) PgSQL
#? #? 1) MySQL
2) PgSQL
#? #? 1) MySQL
2) PgSQL
#? #? #? 1) MySQL
2) PgSQL
#? #? #? 1) MySQL
2) PgSQL
#? #? 1) MySQL
2) PgSQL
#? #? #? #? #? #? 1) MySQL
2) PgSQL
#? 1) MySQL
2) PgSQL
#? #? 1) MySQL
2) PgSQL
#? 
sed: 1: "s/(host:)[^\n]*/\1 /g": \1 not defined in the RE
sed: 1: "s/(username:)[^\n]*/\1 /g": \1 not defined in the RE
sed: 1: "s/(password:)[^\n]*/\1 /g": \1 not defined in the RE
-e 
dyn-5-47:~ rosanna$ https://github.com/diaspora/diaspora.git
dyn-5-47:~ rosanna$ git clone https://github.com/diaspora/diaspora.git
Cloning into diaspora...

help me @Raven24, your my only hope!

@Raven24
Copy link
Member

Raven24 commented Apr 24, 2012

Something must be different about directly piping the script to sh, because when the script is downloaded first and then executed, it works normally...

I have to go and look at how the RVM guys do it ...

@stevenh512
Copy link
Contributor

It also chokes on Ubuntu 11.10 when I pipe the script to sh

 $ curl https://raw.github.com/diaspora/diaspora/master/script/install.sh | /bin/sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6881  100  6881    0     0   1984      0  0:00:03  0:00:03 --:--:--  2524
/bin/sh: shopt: not found
read: 100: Illegal option -d
/bin/sh: Syntax error: "do" unexpected (expecting "}")

Works fine if I download it and execute it manually.

@Raven24
Copy link
Member

Raven24 commented Apr 24, 2012

Piping the script was blocking STDIN which is required for interactivity. Could you try again now?
(The stuff with /bin/sh might have to be /bin/bash, but for me it's working with /bin/sh, too)

@dangold1138
Copy link
Contributor

I just tried it on osx tonight. My first try resulted in this:

dans-macbook:bar dangoldenberg$   curl https://raw.github.com/diaspora/diaspora/master/script/install.sh | /bin/sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7381  100  7381    0     0   4953      0  0:00:01  0:00:01 --:--:--  5360
bash: /Users/dangoldenberg/.git-completion.sh: No such file or directory
#####################################################################
DIASPORA* INSTALL SCRIPT

This script will guide you through the basic steps
to get a copy of Diaspora* up and running
#####################################################################


Press [Enter] to continue... 
checking for git... /usr/bin/git
checking for ruby... /usr/bin/ruby
checking for gem... /usr/bin/gem
checking for bundle... /usr/bin/bundle
checking for sed... /usr/bin/sed

checking for rvm...

Where would you like to put the git clone?
(or, where is your existing git clone)?
-> .

fatal: Not a git repository (or any of the parent directories): .git
mkdir: .: File exists
the folder you specified does not contain a git repo
Press [Enter] to create it... 
fatal: destination path '.' already exists and is not an empty directory.

Database setup
cp: config/database.yml.example: No such file or directory
Which database type are you using?
1) MySQL
2) PgSQL
#? 1
hostname: localhost
username: root
password: 
sed: 1: "s/(host:)[^\n]*/\1 loca ...": \1 not defined in the RE
sed: 1: "s/(username:)[^\n]*/\1  ...": \1 not defined in the RE
sed: 1: "s/(password:)[^\n]*/\1 /g": \1 not defined in the RE

copying application.yml.example to application.yml
cp: config/application.yml.example: No such file or directory

bundling...
Could not locate Gemfile

creating and migrating default database in config/database.yml. please wait...
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2377:in `raw_load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:31

#####################################################################

It worked! :)

Now, you should have a look at

  - config/database.yml      and
  - config/application.yml

and change them to your liking. Then you should be able to
start Diaspora* in development mode with:

    `rails s`


For further information read the wiki at https://github.com/diaspora/diaspora/wiki
or join us on IRC irc://freenode.net/diaspora

dans-macbook:bar dangoldenberg$ ls
dans-macbook:bar dangoldenberg$ pwd
/Users/dangoldenberg/Sites/bar

it seems that when i just put '.', that made it really confused.

also, when i typed '' for the database password, it seemed upset as well.

the second time, it seemed to work better...
slightly

dans-macbook:bar dangoldenberg$   curl https://raw.github.com/diaspora/diaspora/master/script/install.sh | /bin/sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7381  100  7381    0     0   6017      0  0:00:01  0:00:01 --:--:-- 11166
bash: /Users/dangoldenberg/.git-completion.sh: No such file or directory
#####################################################################
DIASPORA* INSTALL SCRIPT

This script will guide you through the basic steps
to get a copy of Diaspora* up and running
#####################################################################


Press [Enter] to continue... 
checking for git... /usr/bin/git
checking for ruby... /usr/bin/ruby
checking for gem... /usr/bin/gem
checking for bundle... /usr/bin/bundle
checking for sed... /usr/bin/sed

checking for rvm...

Where would you like to put the git clone?
(or, where is your existing git clone)?
-> ~/Sites/bar/

mkdir: ~/Sites: No such file or directory
the folder you specified does not contain a git repo
Press [Enter] to create it... 
Cloning into ~/Sites/bar...
remote: Counting objects: 108973, done.
remote: Compressing objects: 100% (29796/29796), done.
remote: Total 108973 (delta 85030), reused 100485 (delta 77852)
Receiving objects: 100% (108973/108973), 26.50 MiB | 339 KiB/s, done.
Resolving deltas: 100% (85030/85030), done.

Database setup
Which database type are you using?
1) MySQL
2) PgSQL
#? 1
hostname: localhost
username: root
password: 
sed: 1: "s/(host:)[^\n]*/\1 loca ...": \1 not defined in the RE
sed: 1: "s/(username:)[^\n]*/\1  ...": \1 not defined in the RE
sed: 1: "s/(password:)[^\n]*/\1 /g": \1 not defined in the RE

copying application.yml.example to application.yml

bundling...
Fetching git://github.com/binarylogic/settingslogic.git
remote: Counting objects: 451, done.
remote: Compressing objects: 100% (222/222), done.
remote: Total 451 (delta 244), reused 389 (delta 192)
Receiving objects: 100% (451/451), 60.66 KiB, done.
Resolving deltas: 100% (244/244), done.
Fetching git://github.com/Empact/roxml.git
remote: Counting objects: 4647, done.
remote: Compressing objects: 100% (1714/1714), done.
remote: Total 4647 (delta 2896), reused 4562 (delta 2822)
Receiving objects: 100% (4647/4647), 642.81 KiB | 623 KiB/s, done.
Resolving deltas: 100% (2896/2896), done.
Fetching git://github.com/diaspora/acts-as-taggable-on.git
remote: Counting objects: 1817, done.
remote: Compressing objects: 100% (757/757), done.
remote: Total 1817 (delta 1234), reused 1483 (delta 974)
Receiving objects: 100% (1817/1817), 251.50 KiB | 248 KiB/s, done.
Resolving deltas: 100% (1234/1234), done.
Fetching git://github.com/pivotal/jasmine-gem.git
remote: Counting objects: 2157, done.
remote: Compressing objects: 100% (934/934), done.
remote: Total 2157 (delta 1191), reused 1911 (delta 993)
Receiving objects: 100% (2157/2157), 2.66 MiB | 226 KiB/s, done.
Resolving deltas: 100% (1191/1191), done.
Fetching git://github.com/diaspora/diaspora-client.git
remote: Counting objects: 471, done.
remote: Compressing objects: 100% (173/173), done.
remote: Total 471 (delta 291), reused 465 (delta 285)
Receiving objects: 100% (471/471), 62.32 KiB, done.
Resolving deltas: 100% (291/291), done.
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.1.0)

  Current Bundler version:
    bundler (1.0.9)

Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.

creating and migrating default database in config/database.yml. please wait...
(in /Users/dangoldenberg/Sites/bar/~/Sites/bar)
rake aborted!
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.1.0)

  Current Bundler version:
    bundler (1.0.9)

Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:239:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:344:in `resolve_requirement'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:343:in `catch'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:343:in `resolve_requirement'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:295:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:294:in `reverse_each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:294:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:160:in `start'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:128:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:127:in `catch'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/resolver.rb:127:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/definition.rb:151:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/definition.rb:90:in `specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/definition.rb:135:in `specs_for'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/definition.rb:124:in `requested_specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/environment.rb:23:in `requested_specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/runtime.rb:11:in `setup'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler.rb:101:in `setup'
/Users/dangoldenberg/Sites/bar/~/Sites/bar/config/boot.rb:17
/Users/dangoldenberg/Sites/bar/~/Sites/bar/config/application.rb:5:in `require'
/Users/dangoldenberg/Sites/bar/~/Sites/bar/config/application.rb:5
/Users/dangoldenberg/Sites/bar/~/Sites/bar/Rakefile:8:in `require'
/Users/dangoldenberg/Sites/bar/~/Sites/bar/Rakefile:8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/System/Library/Frameworks/Ruby.fram

but actually, it just cloned it into a directory called ~

Then I got bored. :/

@maxwell
Copy link
Member

maxwell commented Apr 25, 2012

@Raven24 I have seen these problems too.

I really think we should cut the fancy stuff. Lets just clone it to a new diaspora folder in the current working directory that you clone the repo in. Lets also just default the db to mysql, and make sure it is really easy to just comment it out to enable the postgres setup.

once thats bulletproof, we can work from there.

Less questions and more opinions in the script, methinks.

@Raven24
Copy link
Member

Raven24 commented Apr 25, 2012

... but I wanna play install wizard pout

It should now fail horribly if something went wrong. Also, it is necessary not to use '~' or '.' in the path, because it gets quoted and bash expansion doesn't seem to do its magic when paths are quoted. I can tackle that inconvenience later, but for now you can tab-expand your paths if necessary. ;)

@dnsco
Copy link
Member

dnsco commented Apr 30, 2012

@rosannarosanna you should probably be running it on bsd...

@Raven24
Copy link
Member

Raven24 commented Jun 18, 2012

haven't heard about any more major failures in the install script lately...
would the people who were having troubles mind trying it out again, the way it is described in the Readme now?
I think it should be sufficiently robust for most /(lin)?u(ni)?xy/ systems ;)

@jthorsen
Copy link

I get an error at the 'executing bundle exec rake db:schema:load_if...' stage because it can't find libcurl even though it is installed. What a headache.

@jhass
Copy link
Member

jhass commented Oct 16, 2012

Close and open new ones for new issues with it?

@Raven24
Copy link
Member

Raven24 commented Oct 16, 2012

agreed

@Raven24 Raven24 closed this as completed Oct 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants