codefirst / asakusasatellite Goto Github PK
View Code? Open in Web Editor NEWa realtime chat application for developers
Home Page: https://www.codefirst.org/AsakusaSatellite
License: MIT License
a realtime chat application for developers
Home Page: https://www.codefirst.org/AsakusaSatellite
License: MIT License
as_twitter_link と as_code_highlight_filter を設定で有効にした場合、
以下のようなメッセージを投稿した場合、コードハイライトと Twitterのアンカーが同時に展開されてしまうので、 @ を含んだプログラムソースが意図した状態で貼れません。
ruby:: @hoge
rcov only works Ruby 1.8
Hi
I installed AkasakaSatellite-0.8.1 to my server.
Some member of our team cannnot use the websocket server. He got a error when he posted a message.
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
And I got a error log in log/production.log.
...
Started POST "/chat/message?room_id=51a311b1aed0f12cc9000004" for XXX.XXX.XXX.XXX at Tue May 28 15:28:37 +0900 2013
Processing by ChatController#message as HTML
Parameters: {"utf8"=>"✓", "commit"=>"Send", "authenticity_token"=>"q2JMiVBomRdFslRPYdpXQxtHBqQvWY9VcFZ2wN4koGU=", "room_id"=>"51a311b1aed0f12cc9000004", "message"=>"テスト"}
Redirected to https://YYY.YYY.YYY.YYY:50001/
Redirected to
Completed 500 Internal Server Error in 5ms
AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".):
app/controllers/chat_controller.rb:75:in `message'
Is websocket server required to post messages?
Thanks,
Yoshihiro Imai (@yoshihiro503)
config/filter.yml and config/filter_intra.yml is a bit confusing.
We should add some comment on these files.
uses /.../n in some files.It warns in Ruby 1.9.3/2.0.0
When you try to add an user, who haven't logged in yet, to private room, AsakusaSatellite just ignores the request.
This behavior isn't good especially for enterprise use.
※すみません、手元にMongoDB環境が無いためローカルでは試していません。Herokuと関係ないかもしれません。
環境:
AsakusaSatellite v0.7.0 (git cloneによって取得)
Heroku (stack = bamboo-ree-1.8.7)
手順:
以上の手順を実施すると、「We're sorry, but something went wrong.」となってしまいました。
heroku logs
は以下のようです:
2012-01-04T08:37:40+00:00 app[web.1]: Started POST "/localauth/login" for 219.101.133.190 at Wed Jan 04 00:37:40 -0800 2012
2012-01-04T08:37:40+00:00 app[web.1]: Processing by LocalauthController#login as HTML
2012-01-04T08:37:40+00:00 app[web.1]: Parameters: {"commit"=>"Login", "authenticity_token"=>"cm/k0fUPFjduqJO+wlZcZ10nVBojmPYOki1SI8+iTyE=", "utf8"=>"?", "login"=>{"username"=>"testuser1", "password"=>"[FILTERED]"}}
2012-01-04T08:37:40+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]: NoMethodError (private method `select' called for User:Class):
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]: cache: [POST /localauth/login] invalidate, pass
'device_setting.rb' dosen't contain definition of class 'DeviceSetting' but has 'DeviceSettingListener'.
This confuses rails.
After I finish installation, system display following message on browser.
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
In log/production.log, I can find following message.
Started GET "/as" for 192.168.1.231 at 2012-09-07 13:33:35 +0800
Processing by ChatController#index as HTML
Completed 500 Internal Server Error in 3msTypeError (db_name must be a string or symbol):
app/helpers/application_helper.rb:10:incurrent_user' app/helpers/application_helper.rb:6:in
logged?'
app/controllers/application_controller.rb:23:in `check_login'
Software versions are as follows.
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$ gem --version
1.8.23
$ bundle --version
Bundler version 1.1.5
$ mongod --version
db version v2.2.0, pdfile version 4.5
Fri Sep 7 13:52:30 git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207
Currently errors happened in hooks are just ignored.
Plugin developers need detailed information.
We need only spec:all
Redmine連携プラグインを使うと「メッセージの内容を Redmine に投稿するためのリンクを各メッセージに付加」してくれますが、メッセージにセミコロンやアンパサンドが含まれているときにこのリンクを使うと、「題名」や「説明」欄にコピーされるメッセージが、それらの記号の手前で途切れてしまいます。
How To Reproduce
→表示されるRedmineの「新しいチケット」フォームの「題名」や「説明」欄に入力済みの内容に「; は StringBuilder に書き換えたい」 が欠けています。
"Delete this room" リンクから削除した Room が、アドレス欄にID直打ちで表示できてしまいます。
"read more" からも閲覧可能でした。
#32 broke APNS because of rails/rails#9819
# Rails 3.2.12
"日本語".to_json # => "\u65e5\u672c\u8a9e"
# Rails 3.2.13
"日本語".to_json # => "日本語"
The helper 'find_room' adds new member variable.
This is confusing because the meaning of the declaration changes depending on where it is called from.
For plugin developers, it's very useful if there is some way to add member variables in chatroom page.
But there isn't any hook point in controllers.
After installation, I found that AsakusaSatellite indicates that WebSocket API is not working correctly.
I found setting in config/message_pusher.yml and modified as follows.
default: <%= ENV['MESSAGE_PUSHER_ENGINE'] || 'socky' %>
engines:
socky:
http: http://192.168.1.1:3002/http
web_socket: ws://192.168.1.1:3002/websocket
app: as
secret: secret
But still WebSocket does not work.
I invoke WebSocket server with following command.
bundle exec thin -R socky/config.ru -p3002 -t0 start
By default, it is very annoying to invite many users to private room.
We need function to invite many users at a time.
Emoji filter replace all the words enclosed by colons regardless of whether the emoji actually exists.
It is good to replace them if and only if the emoji actually exists.
仕様上1ページに1か所でしか使ってはならない autofocus 属性が、部屋ページのHTMLコードでは2か所現れています。
このため、Google Chromeではページ下部の新規メッセージ入力欄がオートフォーカスされるのに対し、Firefoxではページ上部の検索キーワード入力欄がオートフォーカスされます。
Firefoxでの挙動は不都合があるので、検索キーワード入力欄 <input id="search_message" name="search[message]">
の要素から autofocus 属性を除去した方が良いと思います。
vendor/plugins/as_redmine_ticket_link/lib/redmine_ticket_link.rb で指定されている https://codefirst.org/as/images/redmine.png の画像が証明書エラーのため、初期設定の Google Chorome だと表示されません。
手元ではとりあえず http://codefirst.org/as/images/redmine.png と SSLを使わない方法で回避しました。
公式のマニュアルでは下記のように表記されていますが、QuoteItプラグインが有効になりません。
config/filter.yml に以下を記述します
- name: quote_it
blogの紹介記事では下記のように表記されており、filter.ymlで上書きできるようにありますが、動作しませんでした。
設定
QuoteIt 連携は、インターネット環境が必要なためデフォルトでは有効になっていません。
設定を有効にするためには、config/filter_intra.yml にある auto_link の代わりに quote_it を記述してください。
単純に config/filter.yml で上書きしても構いません。
config/filter_intra.ymlを編集したところquote_itプラグインが動作するようになりました。
filter.ymlでの上書きが動作していないように思えます。
filter.ymlの内容は元の状態から変更を加えていません。
- name: code_highlight_filter
- name: quote_it
- name: redmine_ticket_link
- name: twitter_link
- name: emoji_filter
harupiyo と申します。
うまくPassenger でApache にデプロイできないようなので、お問い合わせさせて下さい。
http://codefirst.github.com/AsakusaSatellite/manual/setup.html#passenger
の通り設定したのですが、ブラウザからアクセスすると
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
というエラーになってしまいます。
ログには次のエラーが書きこまれていました。
# cat log/production.log
Started GET "/as" for 118.243.71.17 at Mon May 16 15:43:13 +0900 2011
Processing by ChatController#index as HTML
Completed in 1ms
NoMethodError (undefined method `support_key?' for nil:NilClass):
app/helpers/application_helper.rb:10:in `current_user'
app/helpers/application_helper.rb:6:in `logged?'
app/controllers/application_controller.rb:20:in `check_login'
ちなみに、次の方法による、ruby websocket/server.rb &; bundle exec rails server の方法では問題なく動いております。
http://codefirst.github.com/AsakusaSatellite/manual/setup.html#windows-os
もしお分かりの事がありましたらお教えください。
なお、サーバーはさくらVPS(CentOS5) で、AsakusaSatellite のインストール手順は次の通りです。
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz
tar xfz ruby-1.8.7-p334.tar.gz
cd ruby-1.8.7-p334
./configure
make
make test
sudo make install
(http://d.hatena.ne.jp/shokai/20100919/1284908455 より)
sudo yum install zlib-devel
cd ext/zlib
ruby extconf.rb
make
sudo make install
(http://d.hatena.ne.jp/hata-hata/20080416 より)
cd ext/openssl/
ruby extconf.rb
make
sudo make install
wget http://rubyforge.org/frs/download.php/74818/rubygems-1.8.1.tgz
tar xfz rubygems-1.8.1.tgz
cd rubygems-1.8.1
sudo /usr/local/bin/ruby setup.rb
sudo /usr/local/bin/gem install bundler
sudo yum install gcc*
sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel
sudo yum install openssl
wget --no-check-certificate https://github.com/codefirst/AsakusaSatellite/tarball/master
tar xfz codefirst-AsakusaSatellite-v0.3.0-0-g74037f1.tar.gz
cd codefirst-AsakusaSatellite-74037f1/
cp config/filter.yml.example config/filter.yml
cp config/websocket.yml.example config/websocket.yml
cp config/settings.yml.example config/settings.yml
bundle install --path vendor/bundle
bundle exec rake groonga:migrate
※「unsupported column エラーが発生する場合がありますが、問題ないので無視してください。」とのこと。出たので無視した。
ruby websocket/server.rb &
bundle exec rails server
gem install passenger
yum install -y libcurl-devel httpd-devel
passenger-install-apache2-module
以下の3行をhttpd.conf に追加
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby
次の2行をhttpd.conf に追加
RailsEnv production
RailsBaseURI /as
DocumentRoot が/var/www/html だったので、public フォルダを次のようにシンボリックリンクを設置
cd /var/www/html
sudo ln -s /var/AsakusaSatellite/public as
Room 内の "read more" で表示した発言を、 "Delete this message" で削除しても、画面をリロードするまで発言が消えないまま残ってしまう。
非公開部屋を作成し、マニュアルにあるようにユーザの追加を行うと画面上には追加ユーザが表示されますが、update configを押すと元の状態(ユーザが追加されていない状態)に戻ってしまいます。
http://asakusasatellite.readthedocs.org/en/latest/function.html#room-conf
ユーザ名の欄にはRedmineのユーザ名を入れていますが、違う情報を入れる必要があるのでしょうか?
ユーザ認証はRedmine API アクセスキー認証で動かしています。
"Create New Room" をして発言せずに "read more" をクリックすると JSからの呼び出しでエラーになります。
NoMethodError (undefined method `prev' for nil:NilClass): app/controllers/chat_controller.rb:14:in `prev'
以下のようなメッセージを送ると、
ruby::
print "\n"
次のような風に、「\n」の部分が改行に置き換えられてしまいます。
print "
"
I cannot use file uploading when I deployed AS to http://localhost:3000/as/ .
APNS notify to room members now.
We should enable asset pipeline for emojis to improve the performance.
Notify chrome extension users with Google Cloud Messaging for Chrome.
存在しないRoom ID を指定すると 500 エラーになります。
ActionView::Template::Error (undefined method `user' for nil:NilClass): 7: %div 8: .left 9: %h3.title 10: - if @room.user == current_user 11: = on_the_spot_edit @room, :title 12: - else 13: = @room.title
README.markdown says you can test individual specs by:
bundle exec ruby path/to/spec.rb
but it fails because ruby(1.9+) can't find spec_helper.
Some omniauth providers(e.g. omniauth_crowd) require their arguments as hash.
QuoteItプラグインを使いたいのですが、Heroku上に公開されているサーバではなく、ローカルで立てたQuoteItサーバを使わせるようにしたいと考えています。
そのようなことは可能でしょうか?
Firefox16.0.1からAsakusaSatelliteを利用すると、ファイルのドラッグ&ドロップによるアップロード機能が使えないようです。一瞬ボーダーが変化してドロップを受け付ける状態になったと思うと、すぐ元の表示に戻ってしまい、ドロップしてもアップロードが行われません。
I think some controllers are a bit complicated to add new feathres.
We should move some code from controllers and helpers to models and refactor them.
WebSocketのバージョンに追従できていないみたいですが…
ログインしている/していないに関らず、Room 内の "read more" リンクをクリックしたときに、別Roomの発言が取得できてしまいます。
入室している Room に絞るか、 "show recent messages" 的な表記にした方がよさそうです。
http://example.com/as/ のようなURLで運用しているとアップロードしたファイルが表示できません。
本来 "/as/upload/533f9bb2-b7c4-4930-9565-52e524921ea5-sample.jpg'" であるべき参照パスが "/upload/533f9bb2-b7c4-4930-9565-52e524921ea5-sample.jpg'"となっていることを出力されたHTMLで確認しています。
When you move to some othe page and back to the chat page, messages received from websocket are disappeared.
When I request 'GET /chat/room' without any parameter, server returns a room.
The access should be redirected to /chat/index, for example.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.