You are not logged in.
If any service is using tcp port 8080, you must stop that service, there is no option to change the port that websockets use. (Or at least not yet)
DO NOT install this unless you are a developer who intends to work on Diaspora, there any many know security issues with this release, and it IS NOT INTENDED FOR GENERAL USE!! If you are not a developer and want to preview Diaspora, DO NOT OPEN YOUR PORTS to the public!! Failure to do so could result in fire falling from the sky and your server spontaneously catching fire.
As some of you may know, the new social networking tool, Diaspora, has gone open source today. I'm having some trouble installing it, and with it using ruby on rails I have a very limited ability to properly troubleshoot. Update: I'm up and running now, SABnzbd was using port 8080, changed that, and now I can use the thin command instead of the rails one.
So here's the commands I used to install everything (Build tools are needed. Also, do not use ruby 1.9, it will fail on the 'bundle install' command below.):
sudo pacman -S imagemagick git libxslt libxml2
yaourt -S ruby1.8 rubygems1.8 mongodb
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
export PATH=$PATH:/opt/ruby1.8/bin
sudo gem install bundler
sudo /etc/rc.d/mogodb start
git clone git://github.com/diaspora/diaspora.git
cd diaspora
This will get you the base environment needed for Diaspora, and into it's root directory.
First command may need root, if you get permission errors with it, give it root. The third command only needs root if you want to run on a port that's =< 1024.
bundle install
sudo ln -s /opt/ruby1.8/bin/rake /usr/bin/rake
bundle exec thin start
Run on port 80(Also works for alternative rails command):
sudo bundle exec thin --port=80 start
Now, go to http://YOUR-IP:3000/signup and make yourself an account on your shiny new Diaspora installation, then start having fun!!
If the above command ('bundle exec thin start') puts out an error, try this: (This should only be used as a last resort and you should try posting in this thread first.)
bundle exec rails s
To update to the latest revision of Diaspora, from the Diaspora root directory use the following commands:
git pull
sudo bundle install
rake
To clean the database: (Does not need to be done from Diaspora root directory)
mongo diaspora-development
> db.dropDatabase()
Last edited by LeeF (2010-09-17 21:04:16)
\ˈlēf\
ArchLinux ---- Because I don't mind reaching under my penguin's skirt and twiddling about to make her behave.
Offline
I have the same error from ruby 1.9 . I hope someone makes a magical AUR package for this
Offline
I'm currently working on this too,
I installed aur's rubygems-1.8 and ruby-1.8, then I
mv /usr/bin/ruby /usr/bin/ruby-1.9
ln -s /usr/bin/ruby-1.8 /usr/bin/ruby
That worked for bundeling. Don't know about later errors (yet).
Edit: Up and running. No registrations though, so you have to edit a rubyfile in which the initial database is defined.
Hope this works for you, too.
keeeks
Last edited by keeeks (2010-09-16 11:58:46)
Offline
Hi all, I followed the steps as given above and got as far as to the bundle thingy. Then I encountered an error:
/opt/ruby1.8/lib/ruby/1.8/i686-linux/digest/sha1.so: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /opt/ruby1.8/lib/ruby/1.8/i686-linux/digest/sha1.so (LoadError)
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:1
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:116:in `load'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:100:in `setup'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb:324:in `exec'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `send'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `run'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/base.rb:389:in `start'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
Strange, because /opt/ruby1.8/lib/ruby/1.8/i686-linux/digest/sha1.so exists and is world readable. Can somebody with sufficient knowledge of ruby give me some advice on how to deal with this? Thanks very much!
Offline
Is that an old ruby-1.8 build? A rebuild should fix it.
Offline
Just wanted to post to add my support even though I haven't tried it yet, what with the ruby 1.8 requirement requiring more time to deal with than I have atm (I need 1.9 for my window manager).
I am eager to see this working though so good luck!
Offline
Shouldn't be using ruby 1.9 the way to go here? (Future-proofing etc)
I switched ruby-debug to ruby-debug19 in the Gemfile to get through the '$ bundle install' dependencyhell, namely linecache 0.43.
Sadly I hit a rock trying to '$ bundle exec thin start' (log: https://gist.github.com/ab36cb05e2aef1e76053)
I'm not that well versed in ruby yet, did they change the way require's work in 1.9.x? Because lib/mongo_mapper/bson_id(.rb) is there.
Offline
Worked perfectly for me. Now I just need to figure out how it works
Offline
Trying to install it was well, follow the steps you have above but now when i try bundle install i get this:
bundle install
/opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
from /usr/bin/bundle:18
Anyone able to point me in the right direction?
Offline
Is that an old ruby-1.8 build? A rebuild should fix it.
EDIT: Sorry for the noise, of course I forgot to $gem install bundle as they explained in the readme. No it seems I have something running on localhost. Fine, thanks for the help, guys!
Last edited by parthenopaios (2010-09-16 13:38:37)
Offline
Could not find RubyGem bundler
Anyone able to point me in the right direction?
From the README.md file (in diaspora root directory @github) line 25
After you have Ruby installed on your system, you will need to get RubyGems, then install Bundler
Try this:
gem install bundler
Last edited by esdaniel (2010-09-16 12:55:54)
Offline
Shouldn't be using ruby 1.9 the way to go here? (Future-proofing etc)
I switched ruby-debug to ruby-debug19 in the Gemfile to get through the '$ bundle install' dependencyhell, namely linecache 0.43.Sadly I hit a rock trying to '$ bundle exec thin start' (log: https://gist.github.com/ab36cb05e2aef1e76053)
I'm not that well versed in ruby yet, did they change the way require's work in 1.9.x? Because lib/mongo_mapper/bson_id(.rb) is there.
Many things aren't 1.8 to 1.9 compatible sadly.
They went 1.8.7 because that's what Ubuntu currently uses and also what is installed in OS X, which seem to be their target audience right now. Their dev machines seem to be OS X from the screenshots. If you read the release announcement it's all there:
http://www.joindiaspora.com/2010/09/15/ … lease.html
Since my window manager requires 1.9, I guess I'll be waiting until some hackery is worked up for it or something. I don't know what they will do regarding ruby 1.9; perhaps someone will fork it once it reaches a reasonably stable state? Who knows. Probably won't move to 1.9 until either Ubuntu makes that their default, and/or OS X does. But somehow I don't see that happening any time soon, especially for OS X.
Last edited by ungraven (2010-09-16 13:15:00)
Offline
There is a couple of bugs about ruby-1.9 support (with possible patches) on their bug tracker.
Offline
I found a way to get diaspora starting with ruby 1.9 by making the require statements 'more relative'..
- require 'lib/*'
+ require './lib/*'
Here is how:
for f in $(find . -name '*.rb' -exec grep -H "require 'lib/" {} \; | cut -d':' -f1 | sort -u);
do sed -i "s#require 'lib/#require './lib/#" $f;
done
There are a couple of cases where they used douple- instead of single-quotes for requires. I fixed that on my personal fork http://github.com/cryptix/diaspora, too.
Another thing I don't like is what i had to do to the Gemfile to keep it backward compatible to 1.8.x..
- gem 'ruby-debug19'
+ platforms :ruby_18 do
+ gem 'ruby-debug'
+ end
+ platforms :ruby_19 do
+ gem 'ruby-debug19', :require => 'ruby_debug'
+ end
Is there a slicker way to do this?
Offline
@ungraven
RVM (http://rvm.beginrescueend.com/rvm/basics/) is awesome for running different versions of Ruby on the same system. It also handles Rubinius, JRuby and REE.
@cryptix
Ruby 1.9.2 no longer includes the current directory in the load path.
This means that your solution of prefixing "./" when requiring local ruby files (rather than gems) is correct.
That's possibly the cause of the BSON error you were getting.
You could use :platform as an argument to simplify your Gemfile (untested).
gem 'ruby-debug', :platform => :ruby_18
gem 'ruby-debug19', :platform => :ruby_19, :require => 'ruby_debug'
More info here http://gembundler.com/man/gemfile.5.html
While single quotes are not interpolated in Ruby I'm not sure if you'll gain much of a speed increase by changing all of the double quotes. I haven't benchmarked it myself so YMMV.
Last edited by awkwood (2010-09-16 18:44:43)
Offline
You could use :platform as an argument to simplify your Gemfile (untested).
gem 'ruby-debug', :platform => :ruby18 gem 'ruby-debug19', :platform => :ruby18, :require => 'ruby_debug'
I tried that, (with :ruby_19 for ruby-debug19) but it doesn't work somehow.. dunno why.
As for the quotes, i just changed them to have more consistency, but i went a bit too far..
Obviously all isn't done with this. For e.g. the rake and rspec scripts need some work, too.
Offline
Can Someone aid me? I am getting this error upon running bundle exec thin start
[duke@myhost diaspora]$ bundle exec thin start
>> Using rack adapter
/opt/ruby1.8/lib/ruby/gems/1.8/gems/mongo-1.0.8/lib/../lib/mongo/connection.rb:489:in `connect': failed to connect to any given host:port (Mongo::ConnectionFailure)
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/mongo-1.0.8/lib/../lib/mongo/connection.rb:137:in `initialize'
from /home/duke/diaspora/config/initializers/_mongo.rb:8:in `new'
from /home/duke/diaspora/config/initializers/_mongo.rb:8
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:201
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:200:in `each'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:200
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `run_initializers'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `send'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing'
from /home/duke/diaspora/config/environment.rb:12
from /home/duke/diaspora/config.ru:9:in `require'
from /home/duke/diaspora/config.ru:9
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/duke/diaspora/config.ru:1:in `new'
from /home/duke/diaspora/config.ru:1
Offline
Can Someone aid me? I am getting this error upon running bundle exec thin start
[duke@myhost diaspora]$ bundle exec thin start >> Using rack adapter /opt/ruby1.8/lib/ruby/gems/1.8/gems/mongo-1.0.8/lib/../lib/mongo/connection.rb:489:in `connect': failed to connect to any given host:port (Mongo::ConnectionFailure) from /opt/ruby1.8/lib/ruby/gems/1.8/gems/mongo-1.0.8/lib/../lib/mongo/connection.rb:137:in `initialize' from /home/duke/diaspora/config/initializers/_mongo.rb:8:in `new' from /home/duke/diaspora/config/initializers/_mongo.rb:8 from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:201 from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:200:in `each' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:200 from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `run_initializers' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `send' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing' from /home/duke/diaspora/config/environment.rb:12 from /home/duke/diaspora/config.ru:9:in `require' from /home/duke/diaspora/config.ru:9 from /opt/ruby1.8/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize' from /home/duke/diaspora/config.ru:1:in `new' from /home/duke/diaspora/config.ru:1
Have you started mongodb? 'sudo /etc/rc.d/mongodb start'
\ˈlēf\
ArchLinux ---- Because I don't mind reaching under my penguin's skirt and twiddling about to make her behave.
Offline
Sorry, you're right. Stupid Mistake. Anyone know if you can find other Diasporans yet, or if this is merely local?
Offline
Sorry, you're right. Stupid Mistake. Anyone know if you can find other Diasporans yet, or if this is merely local?
Dunno. Try adding headrift aT headrift dOt dyndns DoT org and see if it flies.
Offline
It worked for me. Thank you guys!
One question. I noticed that mongodb and ruby use a lot of space for my root partition. How do I clean all this staff?
"yaourt -R ruby1.8 rubygems1.8 mongodb" I don't think it's enough...
Offline
Hi
If someone gets it to work through apache in a subdirectory let me know please !
Offline
Just FYI:
Apparently the current pre-alpha code has serious security flaws.
Offline
duke11235 wrote:Sorry, you're right. Stupid Mistake. Anyone know if you can find other Diasporans yet, or if this is merely local?
Dunno. Try adding headrift aT headrift dOt dyndns DoT org and see if it flies.
Do not do this, do not open up your ports, this release of Diaspora is for developers only, it suffers from many XSS attacks and the comments allow HTML injection. Also, before you ask questions like this, check out the Diaspora GitHub wiki, it clearly answers these questions and will give you all the info you need.
http://github.com/diaspora/diaspora/wiki
It worked for me. Thank you guys!
One question. I noticed that mongodb and ruby use a lot of space for my root partition. How do I clean all this staff?"yaourt -R ruby1.8 rubygems1.8 mongodb" I don't think it's enough...
Try 'yaourt -Rns' it'll remove configuration/user data specific to that application and take care of any dependencies that were installed for the programs.
Hi
If someone gets it to work through apache in a subdirectory let me know please !
I managed to get it to work by adapting these instructions, however, I'm not sure if running it like this gives you access to the realtime websocket based features of Diaspora.
http://github.com/diaspora/diaspora/wik … buntu-LAMP
Just FYI:
Apparently the current pre-alpha code has serious security flaws.
Thanks for pointing that out, I'm sure some people on here didn't know that, however I do and I had intended this thread be a guide for developers who are working on Diaspora in an Arch environment. I have added a warning to my original post, just to make sure everyone knows.
Last edited by LeeF (2010-09-17 21:05:06)
\ˈlēf\
ArchLinux ---- Because I don't mind reaching under my penguin's skirt and twiddling about to make her behave.
Offline
maxi_jac wrote:Hi
If someone gets it to work through apache in a subdirectory let me know please !
I managed to get it to work by adapting these instructions, however, I'm not sure if running it like this gives you access to the realtime websocket based features of Diaspora.
http://github.com/diaspora/diaspora/wik … buntu-LAMP
I've tried that, but the root of Diaspora is conflicting with my /srv/http root.
To be clear : I host a statusnet install at /srv/http/statusnet. I'd like diaspora to be called from server.com/diaspora or at least server/ but with server/statusnet still working which is not the case, Whatever I do the ruby web server takes the whole apache for itself...
Offline